jamielinux pushed to nginx (master). "Move default server to default.conf (#1220094)"

notifications at fedoraproject.org notifications at fedoraproject.org
Sun May 10 08:54:23 UTC 2015


From 78b11f8ceb1d38abaf97bc9a72ae5c06c68834f0 Mon Sep 17 00:00:00 2001
From: Jamie Nguyen <j at jamielinux.com>
Date: Sun, 10 May 2015 09:48:00 +0100
Subject: Move default server to default.conf (#1220094)


diff --git a/default.conf b/default.conf
new file mode 100644
index 0000000..08a8c78
--- /dev/null
+++ b/default.conf
@@ -0,0 +1,20 @@
+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 dc7936a..7b3bdee 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -31,25 +31,4 @@ 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 58f58fd..39bfea1 100644
--- a/nginx.spec
+++ b/nginx.spec
@@ -37,6 +37,7 @@ 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
@@ -174,6 +175,8 @@ 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} \
@@ -239,6 +242,7 @@ 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
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/nginx.git/commit/?h=master&id=78b11f8ceb1d38abaf97bc9a72ae5c06c68834f0


More information about the scm-commits mailing list