]> git.pld-linux.org Git - packages/nginx.git/commitdiff
merge http based build configs to one
authorElan Ruusamäe <glen@delfi.ee>
Sun, 3 May 2015 20:48:08 +0000 (23:48 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 3 May 2015 20:48:08 +0000 (23:48 +0300)
nginx-light.conf [deleted file]
nginx-perl.conf [deleted file]
nginx.conf [moved from nginx-standard.conf with 88% similarity]
nginx.spec

diff --git a/nginx-light.conf b/nginx-light.conf
deleted file mode 100644 (file)
index 0e7b23f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-user                   nginx nginx;
-error_log              /var/log/nginx/nginx-light_error.log;
-pid                    /var/run/nginx-light.pid;
-
-events {
-       worker_connections      2048;
-       use epoll;
-}
-
-http {
-       include         /etc/nginx/mime.types;
-       default_type    application/octet-stream;
-
-       log_format      main    '$remote_addr - $remote_user [$time_local] $request '
-                               '"$status" $body_bytes_sent "$http_referer" '
-                               '"$http_user_agent" "$http_x_forwarded_for"';
-       access_log      /var/log/nginx/nginx-light_access.log   main;
-
-       server {
-               listen          80;
-               server_name     localhost;
-               access_log      /var/log/nginx/nginx-light_access.log  main;
-
-               location / {
-                       autoindex       on;
-                       root    /home/services/nginx/html;
-                       index   index.html index.htm index.php;
-               }
-
-               include webapps.d/*.conf;
-       }
-
-       include vhosts.d/*.conf;
-}
diff --git a/nginx-perl.conf b/nginx-perl.conf
deleted file mode 100644 (file)
index 311b2b1..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-user                   nginx nginx;
-error_log              /var/log/nginx/nginx-perl_error.log;
-pid                    /var/run/nginx-perl.pid;
-
-events {
-       worker_connections      2048;
-       use epoll;
-}
-
-http {
-       include         /etc/nginx/mime.types;
-       default_type    application/octet-stream;
-
-       log_format      main    '$remote_addr - $remote_user [$time_local] $request '
-                               '"$status" $body_bytes_sent "$http_referer" '
-                               '"$http_user_agent" "$http_x_forwarded_for"';
-       access_log      /var/log/nginx/nginx-perl_access.log    main;
-
-#      perl_modules    perl/lib;
-#      perl_require    /home/services/nginx/cgi-bin/example-hello-01.pm;
-       
-       perl_set  $msie6  '
-       sub {
-               my $r = shift;
-               my $ua = $r->header_in("User-Agent");
-               return "" if $ua =~ /Opera/;
-               return "1" if $ua =~ / MSIE [6-9]\.\d+/;
-               return "";
-       }
-       ';
-
-       #       For more visit
-       #       http://wiki.codemongers.com/NginxEmbeddedPerlModule
-
-       server {
-               listen          80;
-               server_name     localhost;
-               access_log      /var/log/nginx/nginx-perl_access.log  main;
-
-               location / {
-                       #perl   example-hello-01::handler;
-
-                       autoindex       on;
-                       root    /home/services/nginx/html;
-                       index   index.html index.htm index.php;
-               }
-
-
-               location ~ ^/cgi-bin/.*\.cgi$ {
-                       fastcgi_pass    unix:/var/run/nginx-perl_cgi.sock;
-                       fastcgi_index   index.cgi;
-                       fastcgi_param   SCRIPT_FILENAME /home/services/nginx/$fastcgi_script_name;
-                       fastcgi_param   QUERY_STRING    $query_string;
-                       fastcgi_param   REQUEST_METHOD  $request_method;
-                       fastcgi_param   CONTENT_TYPE    $content_type;
-                       fastcgi_param   CONTENT_LENGTH  $content_length;
-                       fastcgi_param   GATEWAY_INTERFACE       CGI/1.1;
-                       fastcgi_param   SERVER_SOFTWARE nginx;
-                       fastcgi_param   SCRIPT_NAME     $fastcgi_script_name;
-                       fastcgi_param   REQUEST_URI     $request_uri;
-                       fastcgi_param   DOCUMENT_URI    $document_uri;
-                       fastcgi_param   DOCUMENT_ROOT   $document_root;
-                       fastcgi_param   SERVER_PROTOCOL $server_protocol;
-                       fastcgi_param   REMOTE_ADDR     $remote_addr;
-                       fastcgi_param   REMOTE_PORT     $remote_port;
-                       fastcgi_param   SERVER_ADDR     $server_addr;
-                       fastcgi_param   SERVER_PORT     $server_port;
-                       fastcgi_param   SERVER_NAME     $server_name;
-                       fastcgi_read_timeout    5m;
-               }
-
-               include webapps.d/*.conf;
-       }
-
-       include vhosts.d/*.conf;
-}
similarity index 88%
rename from nginx-standard.conf
rename to nginx.conf
index 50125d31fba40293cf509233796984a65932f48d..1eb3ce25d1f97db5f06ab48d1872de8fe929197e 100644 (file)
@@ -1,6 +1,6 @@
 user                   nginx nginx;
-error_log              /var/log/nginx/nginx-standard_error.log;
-pid                    /var/run/nginx-standard.pid;
+error_log              /var/log/nginx/nginx-@flavor@_error.log;
+pid                    /var/run/nginx-@flavor@.pid;
 
 events {
        worker_connections      2048;
@@ -14,7 +14,7 @@ http {
        log_format      main    '$remote_addr - $remote_user [$time_local] $request '
                                '"$status" $body_bytes_sent "$http_referer" '
                                '"$http_user_agent" "$http_x_forwarded_for"';
-       access_log      /var/log/nginx/nginx-standard_access.log        main;
+       access_log      /var/log/nginx/nginx-@flavor@_access.log        main;
 
        server {
                listen          80;
@@ -36,7 +36,7 @@ http {
                # ssl_certificate_key /etc/nginx/server.key;
 
                server_name     localhost;
-               access_log      /var/log/nginx/nginx-standard_access.log  main;
+               access_log      /var/log/nginx/nginx-@flavor@_access.log main;
 
                location / {
                        autoindex       on;
@@ -45,7 +45,7 @@ http {
                }
 
                include webapps.d/*.conf;
-       }
+       }
 
        include vhosts.d/*.conf;
 }
index 7a39ec60f9b97e4ec3d41b07da5235e7954ead5c..b289a411b2c93c9b51ab466829343566fef51602 100644 (file)
@@ -46,14 +46,12 @@ Source1:    http://nginx.net/favicon.ico
 Source2:       proxy.conf
 Source3:       %{name}.logrotate
 Source4:       %{name}.mime
-Source5:       %{name}-light.conf
 Source6:       %{name}-light.monitrc
 Source7:       %{name}.init
 Source8:       %{name}-mail.conf
 Source9:       %{name}-mail.monitrc
-Source11:      %{name}-perl.conf
 Source12:      %{name}-perl.monitrc
-Source14:      %{name}-standard.conf
+Source14:      %{name}.conf
 Source15:      %{name}-standard.monitrc
 Source17:      %{name}-mime.types.sh
 Source18:      %{name}-standard.service
@@ -410,6 +408,7 @@ cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/proxy.conf
 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mime.types
 cp -p %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-standard.conf
+%{__sed} -i -e 's/@flavor@/standard/g' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-standard.conf
 cp -p %{SOURCE15} $RPM_BUILD_ROOT/etc/monit/%{name}-standard.monitrc
 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-standard
 %{__sed} -i -e 's/@flavor@/standard/g' $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-standard
@@ -418,7 +417,8 @@ install -p bin/nginx-standard $RPM_BUILD_ROOT%{_sbindir}
 ln -sf %{systemdunitdir}/%{name}-standard.service $RPM_BUILD_ROOT/etc/systemd/system/nginx.service
 
 %if %{with light}
-cp -p  %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-light.conf
+cp -p %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-light.conf
+%{__sed} -i -e 's/@flavor@/light/g' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-light.conf
 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/monit/%{name}-light.monitrc
 cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-light
 %{__sed} -i -e 's/@flavor@/light/g' $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-light
@@ -437,7 +437,8 @@ cp -p %{SOURCE21} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-mail.service
 
 %if %{with perl}
 install -d $RPM_BUILD_ROOT{%{perl_vendorarch},%{perl_vendorarch}/auto/%{name}}
-cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-perl.conf
+cp -p %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-perl.conf
+%{__sed} -i -e 's/@flavor@/perl/g' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-perl.conf
 cp -p %{SOURCE12} $RPM_BUILD_ROOT/etc/monit/%{name}-perl.monitrc
 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-perl
 %{__sed} -i -e 's/@flavor@/perl/g' $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-perl
This page took 0.396837 seconds and 4 git commands to generate.