Skip to content

Conversation

@jvonau
Copy link
Contributor

@jvonau jvonau commented Oct 24, 2019

Description of changes proposed in this pull request.

allows nginx to be disabled and restore apache2 as the primary webserver.

Smoke-tested in operating system.

Tested using runrole nginx and iiab-configure as part of #2016 on rpi4 would need clean install testing

Mention a team member for further information or comment using @ name

@holta holta added this to the 7.1 milestone Oct 24, 2019
@holta
Copy link
Member

holta commented Oct 24, 2019

See PR #2009 by @georgejhunt that this is building upon.

@jvonau jvonau force-pushed the gh_nginx_2 branch 2 times, most recently from f491810 to 4564995 Compare October 24, 2019 03:56
@holta holta changed the title Gh nginx 2 gh_nginx_2: NGINX alongside Apache (by @georgejhunt, being reworked by @jvonau) Nov 4, 2019
@holta
Copy link
Member

holta commented Nov 4, 2019

See @jvonau's holta#312 which was branch jvonau:gh-nginx-3 (144 files changed).

See @jvonau's holta#314 (135 files changed) which tests combining the above with PR #2020 -> #2031 ("introduce /etc/iiab/iiab_state.yml and begin breaking apart playbooks into install.yml + setup.yml + enable.yml").

@holta
Copy link
Member

holta commented Nov 5, 2019

@mikkokotila as IIAB strongly considers supporting NGINX in coming weeks/months (as well as Apache, initially!) are there design considerations we should keep in mind towards possibly supporting Matomo or similar community-friendly / NGO-friendly analytics in future?

Related:
#224 "Nginx alongside Apache for better analytics (& Captive Portal too?)"
#1268 "AWStats community patterns/analytics/statistics/metrics"
#1762 "IIAB Community Analytics framework, above & beyond AWStats (likely Matomo?)"

@mikkokotila
Copy link

I think for now, let's just make sure we configure the access.log appropriately for nginx, and that we move all the services to be served by it (if possible), and I think we can get started with a hugely more meaningful approach than AWStats with a custom dashboard of some sort for analytics.

@jvonau
Copy link
Contributor Author

jvonau commented Nov 5, 2019

I will not work on this due to what appears to be a python2 package uwsgi-plugin-python

pi@box:/opt/iiab/iiab $ sudo apt show uwsgi-plugin-python
Package: uwsgi-plugin-python
Version: 2.0.18-1
Priority: optional
Section: httpd
Source: uwsgi
Maintainer: uWSGI packaging team pkg-uwsgi-devel@lists.alioth.debian.org
Installed-Size: 229 kB
Provides: httpd-wsgi
Depends: uwsgi-core (= 2.0.18-1), libc6 (>= 2.27), libpython2.7 (>= 2.7)
Suggests: python-uwsgidecorators
Homepage: http://projects.unbit.it/uwsgi/
Download-Size: 101 kB
APT-Manual-Installed: yes
APT-Sources: http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
Description: WSGI plugin for uWSGI (Python 2)
uWSGI presents a complete stack for networked/clustered web applications,
implementing message/object passing, caching, RPC and process management.
It is designed to be fully modular. This means that different plugins can be
used in order to add compatibility with tons of different technology on top of
the same core.
.
This package provides Python WSGI plugin for uWSGI

There is a python3 equalivent:

pi@box:/opt/iiab/iiab $ sudo apt list uwsgi-plugin-python*
Listing... Done
uwsgi-plugin-python3/stable 2.0.18-1 armhf
uwsgi-plugin-python/stable,now 2.0.18-1 armhf [installed]

@tim-moody
Copy link
Contributor

can someone please boil down the file structure?
top level is nginx.conf under which are conf.d and sites-enabled
where is the server declaration and where are the inclusions of locations including proxied locations?

@jvonau
Copy link
Contributor Author

jvonau commented Nov 6, 2019

Main config file is /etc/nginx/nginx.conf with a few includes. I didn't grab the stock nginx.conf file before running the role, could you use apt and attach a copy.

pi@box:/opt/iiab/iiab $ ls /etc/nginx/*
/etc/nginx/fastcgi.conf /etc/nginx/mime.types /etc/nginx/server.conf
/etc/nginx/fastcgi_params /etc/nginx/nginx.conf /etc/nginx/uwsgi_params
/etc/nginx/koi-utf /etc/nginx/proxy_params /etc/nginx/win-utf
/etc/nginx/koi-win /etc/nginx/scgi_params
/etc/nginx/conf.d:
admin-console.conf lokole-nginx.conf nodered-nginx.conf
calibre-web-nginx.conf mediawiki-nginx.conf osm-vector-maps-nginx.conf
elgg-nginx.conf moodle-nginx.conf sugarizer-nginx.conf
kiwix-nginx.conf munin24-nginx.conf usb-lib.conf
kolibri-nginx.conf nextcloud-nginx.conf wordpress-nginx.conf
/etc/nginx/modules-available:
/etc/nginx/modules-enabled:
10-mod-http-ndk.conf 50-mod-http-lua.conf
50-mod-http-auth-pam.conf 50-mod-http-perl.conf
50-mod-http-cache-purge.conf 50-mod-http-subs-filter.conf
50-mod-http-dav-ext.conf 50-mod-http-uploadprogress.conf
50-mod-http-echo.conf 50-mod-http-upstream-fair.conf
50-mod-http-fancyindex.conf 50-mod-http-xslt-filter.conf
50-mod-http-geoip.conf 50-mod-mail.conf
50-mod-http-headers-more-filter.conf 50-mod-nchan.conf
50-mod-http-image-filter.conf 50-mod-stream.conf
/etc/nginx/sites-available:
default
/etc/nginx/sites-enabled:
/etc/nginx/snippets:
fastcgi-php.conf snakeoil.conf

@tim-moody
Copy link
Contributor

on ubuntu 18.04 VM the uwsgi unit file needs
ExecStart=/usr/bin/uwsgi --ini /etc/uwsgi/apps-enabled/admin-console.ini
also why .unit and not .service like all the others?

@jvonau
Copy link
Contributor Author

jvonau commented Nov 7, 2019

I didn't have any issue with the ExecStart line, did the /usr/share/uwsgi/conf/default.ini present? Don't think the .unit is correct maybe could be .socket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants