From 14377bb60f6d4bad35cd0e151ca578f027d64c3d Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Sun, 10 May 2015 10:24:59 +0100 Subject: [PATCH] Revert "Move default server to default.conf (#1220094)" This reverts commit 78b11f8ceb1d38abaf97bc9a72ae5c06c68834f0. --- default.conf | 20 -------------------- nginx.conf | 21 +++++++++++++++++++++ nginx.spec | 4 ---- 3 files changed, 21 insertions(+), 24 deletions(-) delete mode 100644 default.conf diff --git a/default.conf b/default.conf deleted file mode 100644 index 08a8c78..0000000 --- a/default.conf +++ /dev/null @@ -1,20 +0,0 @@ -server { - listen 80 default_server; - listen [::]:80 default_server; - server_name _; - root /usr/share/nginx/html; - - # Load configuration files for the default server block. - include /etc/nginx/default.d/*.conf; - - location / { - } - - error_page 404 /404.html; - location = /40x.html { - } - - error_page 500 502 503 504 /50x.html; - location = /50x.html { - } -} diff --git a/nginx.conf b/nginx.conf index 7b3bdee..dc7936a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -31,4 +31,25 @@ http { # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; + + server { + listen 80 default_server; + listen [::]:80 default_server; + server_name _; + root /usr/share/nginx/html; + + # Load configuration files for the default server block. + include /etc/nginx/default.d/*.conf; + + location / { + } + + error_page 404 /404.html; + location = /40x.html { + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + } + } } diff --git a/nginx.spec b/nginx.spec index ee23529..fbbb9b1 100644 --- a/nginx.spec +++ b/nginx.spec @@ -37,7 +37,6 @@ Source11: nginx.logrotate Source12: nginx.conf Source13: nginx-upgrade Source14: nginx-upgrade.8 -Source20: default.conf Source100: index.html Source101: poweredby.png Source102: nginx-logo.png @@ -175,8 +174,6 @@ install -p -d -m 0755 %{buildroot}%{nginx_webroot} install -p -m 0644 %{SOURCE12} \ %{buildroot}%{nginx_confdir} -install -p -m 0644 %{SOURCE20} \ - %{buildroot}%{nginx_confdir}/conf.d install -p -m 0644 %{SOURCE100} \ %{buildroot}%{nginx_webroot} install -p -m 0644 %{SOURCE101} %{SOURCE102} \ @@ -242,7 +239,6 @@ fi %config(noreplace) %{nginx_confdir}/uwsgi_params %config(noreplace) %{nginx_confdir}/uwsgi_params.default %config(noreplace) %{nginx_confdir}/win-utf -%config(noreplace) %{nginx_confdir}/conf.d/default.conf %config(noreplace) %{_sysconfdir}/logrotate.d/nginx %dir %{perl_vendorarch}/auto/nginx %{perl_vendorarch}/nginx.pm