[nginx/f21: 9/10] Create /etc/nginx/default.d directory

Jamie Nguyen jamielinux at fedoraproject.org
Mon Sep 22 16:13:26 UTC 2014


commit ba74fc1e0aa5895bd4519c090234f96d05ba500c
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Mon Sep 22 12:10:59 2014 +0100

    Create /etc/nginx/default.d directory

 nginx.conf |   68 +++++------------------------------------------------------
 nginx.spec |    5 ++++
 2 files changed, 11 insertions(+), 62 deletions(-)
---
diff --git a/nginx.conf b/nginx.conf
index b2bbf14..ed521ca 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -35,15 +35,15 @@ http {
 
     #gzip  on;
 
+    index   index.html index.htm;
+
     # Load modular configuration files from the /etc/nginx/conf.d directory.
     # See http://nginx.org/en/docs/ngx_core_module.html#include
     # for more information.
     include /etc/nginx/conf.d/*.conf;
 
-    index   index.html index.htm;
-
     server {
-        listen       80;
+        listen       80 default_server;
         server_name  localhost;
         root         /usr/share/nginx/html;
 
@@ -51,6 +51,9 @@ http {
 
         #access_log  /var/log/nginx/host.access.log  main;
 
+        # Load configuration files for the default server block.
+        include /etc/nginx/default.d/*.conf;
+
         location / {
         }
 
@@ -65,64 +68,5 @@ http {
         error_page   500 502 503 504  /50x.html;
         location = /50x.html {
         }
-
-        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
-        #
-        #location ~ \.php$ {
-        #    proxy_pass   http://127.0.0.1;
-        #}
-
-        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
-        #
-        #location ~ \.php$ {
-        #    root           html;
-        #    fastcgi_pass   127.0.0.1:9000;
-        #    fastcgi_index  index.php;
-        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
-        #    include        fastcgi_params;
-        #}
-
-        # deny access to .htaccess files, if Apache's document root
-        # concurs with nginx's one
-        #
-        #location ~ /\.ht {
-        #    deny  all;
-        #}
     }
-
-
-    # another virtual host using mix of IP-, name-, and port-based configuration
-    #
-    #server {
-    #    listen       8000;
-    #    listen       somename:8080;
-    #    server_name  somename  alias  another.alias;
-    #    root         html;
-
-    #    location / {
-    #    }
-    #}
-
-
-    # HTTPS server
-    #
-    #server {
-    #    listen       443;
-    #    server_name  localhost;
-    #    root         html;
-
-    #    ssl                  on;
-    #    ssl_certificate      cert.pem;
-    #    ssl_certificate_key  cert.key;
-
-    #    ssl_session_timeout  5m;
-
-    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
-    #    ssl_ciphers  HIGH:!aNULL:!MD5;
-    #    ssl_prefer_server_ciphers   on;
-
-    #    location / {
-    #    }
-    #}
-
 }
diff --git a/nginx.spec b/nginx.spec
index d69da91..b3406c2 100644
--- a/nginx.spec
+++ b/nginx.spec
@@ -191,6 +191,7 @@ install -p -D -m 0644 %{SOURCE11} \
     %{buildroot}%{_sysconfdir}/logrotate.d/nginx
 
 install -p -d -m 0755 %{buildroot}%{nginx_confdir}/conf.d
+install -p -d -m 0755 %{buildroot}%{nginx_confdir}/default.d
 install -p -d -m 0700 %{buildroot}%{nginx_home}
 install -p -d -m 0700 %{buildroot}%{nginx_home_tmp}
 install -p -d -m 0700 %{buildroot}%{nginx_logdir}
@@ -297,11 +298,15 @@ fi
 %dir %{nginx_datadir}/html
 %dir %{nginx_confdir}
 %dir %{nginx_confdir}/conf.d
+%dir %{nginx_confdir}/default.d
 
 
 %changelog
 * Mon Sep 22 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.6.2-2
 - create nginx-filesystem subpackage (patch from Remi Collet)
+- create /etc/nginx/default.d as a drop-in directory for configuration files
+  for the default server block
+- clean up nginx.conf
 
 * Wed Sep 17 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.6.2-1
 - update to upstream release 1.6.2


More information about the scm-commits mailing list