nginx: update to 1.17.6 and use custom /etc/nginx/nginx.conf [RFC]#9859
nginx: update to 1.17.6 and use custom /etc/nginx/nginx.conf [RFC]#9859peter-stadler wants to merge 1 commit into
Conversation
|
I did update this PR to follow the changes in the meantime. The luci PR still refers to the old version, I could update it afterwards. |
|
@Ansuel looks ok now ready to merge? |
|
We are discussing, how other sites should be included on behalf of the example of ariang: #9860 Would wait for that … |
|
This is one proposal: The file The server part The locations can also be used in other The |
|
Looks good... last thing, a readme in the etc nginx config would be good Last thing how to handle service that should run on https and should be redirected from http to https ? |
|
Thank you. You are right I will write a config for https and then a readme ... |
|
Took me some time for adding ssl to the init, now it should work quite automagically:
The prime points 2, 3 and 5 can be used for other domains, too: Create a I am glad if you can run it and I am open for any comments. Meanwhile, I would do some more tests and then write a documentation ... |
|
Did some tests and cleaned it up. |
|
Made some minor improvements and fixes. The docu is WIP. |
|
The documentation should be quite ready, made some changes for logging errors to syslog and set access_log off by default. What do you think? |
ae7ab02 to
48bebd4
Compare
fd6e780 to
55a7ed6
Compare
Instead of the default nginx.conf file this file is a small variant without examples that enables the /etc/nginx/conf.d/ directory. It will pull in all configuration files from the conf.d directory. So, other packages can add their server parts in the conf.d directory without modifying the main nginx.conf file. Changed default logging behavior: error_log stderr; access_log off; See also the updated documentation at: https://openwrt.org/docs/guide-user/services/webserver/nginx See also: openwrt#9860 Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
|
Is this PR still relevant? |
|
I created a tool (now) that does the main work, see #10960. When that is aproved, I will create another PR that superseeds this one here. |
|
This must be rebased. Or closed. |
|
As the nginx-util is merged, I will make a new PR on Monday. |
|
(Draft PR at #11081) |
Maintainer: Thomas Heil heil@terminal-consulting.de and Ansuel Smith ansuelsmth@gmail.com
Compile tested: MIPS 74K, Asus RT-N16, master snapshot
Run tested: MIPS 74K, Asus RT-N16, master snapshot, let it serve luci-ssl-nginx
Description:
Replace the standard config file containing commented examples with a minimal /etc/nginx/nginx.conf file that will load all /etc/nginx/conf.d/*.conf files. So other packages can install their server { … } parts for nginx in that directory instead of replacing or modifying the main nginx.conf file.
This PR includes also the corresponding changes for luci on nginx (nginx-mod-luci and nginx-mod-luci-ssl). I made also another PR for nginx-luci and nginx-ssl-luci that collect their files from packages …
In the official packages there is just one other app that uses nginx at this time: ariang. See my other PR for changing its nginx part accordingly.
Edit: I did update this PR to follow the changes in the meantime. I would update the other PR for nginx-luci and nginx-ssl-luci later if you think it is a good idea to extract the luci files from the nginx and uwsgi-cgi packages.
Edit2: Changed the documentation and included files/README.sh in the package for creating the documentations’s configuration part with the variables from the sources.
Furthermore, changed the default logging behavior: access_log off; error_log stderr; that is forwarded by the init to logd.