From 22e17bb10c589775b3196b07bde4912658a5dcbd Mon Sep 17 00:00:00 2001 From: André Draszik Date: Fri, 18 Jan 2019 14:26:11 +0000 Subject: nginx: configuration update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restructure the main configuration file to simplify custom configuration: * support inclusion of configuration fragments from subdirectories: - /etc/nginx/modules-enabled/*.conf - /etc/nginx/conf.d/*.conf - /etc/nginx/sites-enabled/* * default site (port 80): - move into /etc/nginx/sites-available/default_server and enable via symlink in /etc/nginx/sites-enabled/ - listen on IPv6 - drop unneeded example fragments * configure and enable gzip * update TLS settings to drop SSLv3 and enable TLSv1.3 for some safer defaults * update remaining bits to follow Debian standard configuration https://salsa.debian.org/nginx-team/nginx/blob/62a54a8ba66ee6cc1b4f8a33dab9a6f27a3fdac4/debian/conf/nginx.conf * drop unneeded example configuration bits from /etc/nginx/*.default These changes, in particular the configuration fragment support allow to easily customise nginx based on individual requirements. In addition, it is now possible for other recipes / packages to drop fragments into the respective directories in /etc/nginx without having to meddle with /etc/nginx/nginx.conf Signed-off-by: André Draszik Signed-off-by: Khem Raj --- .../recipes-httpd/nginx/files/default_server.site | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 meta-webserver/recipes-httpd/nginx/files/default_server.site (limited to 'meta-webserver/recipes-httpd/nginx/files/default_server.site') diff --git a/meta-webserver/recipes-httpd/nginx/files/default_server.site b/meta-webserver/recipes-httpd/nginx/files/default_server.site new file mode 100644 index 0000000000..7a8a215cfa --- /dev/null +++ b/meta-webserver/recipes-httpd/nginx/files/default_server.site @@ -0,0 +1,14 @@ +# Default server configuration +server { + listen 80 default_server; + listen [::]:80 default_server; + + root /var/www/localhost/html; + + index index.html index.htm; + + server_name _; + + # redirect server error pages to the static page /50x.html + error_page 500 502 503 504 /50x.html; +} -- cgit v1.2.3-54-g00ecf