Compare commits
3 Commits
rawhide
...
private-re
Author | SHA1 | Date | |
---|---|---|---|
|
8f51b5b8c5 | ||
|
624eb2753e | ||
|
e13af58731 |
27
default.conf
Normal file
27
default.conf
Normal file
@ -0,0 +1,27 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
#charset koi8-r;
|
||||
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
# Global configuration for all servers
|
||||
include global.d/*.conf;
|
||||
|
||||
location / {
|
||||
}
|
||||
|
||||
# redirect server error pages to the static page /40x.html
|
||||
#
|
||||
error_page 404 /404.html;
|
||||
location = /40x.html {
|
||||
}
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
}
|
||||
}
|
88
nginx.conf
88
nginx.conf
@ -35,94 +35,10 @@ 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;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
#charset koi8-r;
|
||||
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
}
|
||||
|
||||
# redirect server error pages to the static page /40x.html
|
||||
#
|
||||
error_page 404 /404.html;
|
||||
location = /40x.html {
|
||||
}
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
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 / {
|
||||
# }
|
||||
#}
|
||||
|
||||
}
|
||||
|
54
nginx.spec
54
nginx.spec
@ -27,7 +27,7 @@
|
||||
Name: nginx
|
||||
Epoch: 1
|
||||
Version: 1.6.2
|
||||
Release: 1%{?dist}
|
||||
Release: 1%{?dist}.2
|
||||
|
||||
Summary: A high performance web server and reverse proxy server
|
||||
Group: System Environment/Daemons
|
||||
@ -45,6 +45,7 @@ Source13: nginx-upgrade
|
||||
Source14: nginx-upgrade.8
|
||||
Source15: nginx.init
|
||||
Source16: nginx.sysconfig
|
||||
Source17: default.conf
|
||||
Source100: index.html
|
||||
Source101: poweredby.png
|
||||
Source102: nginx-logo.png
|
||||
@ -66,12 +67,14 @@ BuildRequires: pcre-devel
|
||||
BuildRequires: perl-devel
|
||||
BuildRequires: perl(ExtUtils::Embed)
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
Requires: nginx-filesystem = %{epoch}:%{version}-%{release}
|
||||
Requires: GeoIP
|
||||
Requires: gd
|
||||
Requires: openssl
|
||||
Requires: pcre
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires(pre): shadow-utils
|
||||
Requires(pre): nginx-filesystem
|
||||
Provides: webserver
|
||||
|
||||
%if 0%{?with_systemd}
|
||||
@ -91,6 +94,18 @@ IMAP protocols, with a strong focus on high concurrency, performance and low
|
||||
memory usage.
|
||||
|
||||
|
||||
%package filesystem
|
||||
Group: System Environment/Daemons
|
||||
Summary: The basic directory layout for the Nginx server
|
||||
BuildArch: noarch
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
%description filesystem
|
||||
The nginx-filesystem package contains the basic directory layout
|
||||
for the Nginx server including the correct permissions for the
|
||||
directories.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0
|
||||
@ -178,6 +193,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}/global.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}
|
||||
@ -185,6 +201,8 @@ install -p -d -m 0755 %{buildroot}%{nginx_webroot}
|
||||
|
||||
install -p -m 0644 %{SOURCE12} \
|
||||
%{buildroot}%{nginx_confdir}
|
||||
install -p -m 0644 %{SOURCE17} \
|
||||
%{buildroot}%{nginx_confdir}/conf.d/
|
||||
install -p -m 0644 %{SOURCE100} \
|
||||
%{buildroot}%{nginx_webroot}
|
||||
install -p -m 0644 %{SOURCE101} %{SOURCE102} \
|
||||
@ -198,8 +216,12 @@ install -p -D -m 0644 %{_builddir}/nginx-%{version}/man/nginx.8 \
|
||||
install -p -D -m 0755 %{SOURCE13} %{buildroot}%{_bindir}/nginx-upgrade
|
||||
install -p -D -m 0644 %{SOURCE14} %{buildroot}%{_mandir}/man8/nginx-upgrade.8
|
||||
|
||||
# I think this is better configuratio, more close to apache behavior
|
||||
sed -e '/SERVER_NAME/s/server_name/host/' \
|
||||
-i %{buildroot}%{nginx_confdir}/fastcgi_params
|
||||
|
||||
%pre
|
||||
|
||||
%pre filesystem
|
||||
getent group %{nginx_group} > /dev/null || groupadd -r %{nginx_group}
|
||||
getent passwd %{nginx_user} > /dev/null || \
|
||||
useradd -r -d %{nginx_home} -g %{nginx_group} \
|
||||
@ -241,8 +263,10 @@ fi
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc LICENSE CHANGES README
|
||||
%{nginx_datadir}/
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license LICENSE
|
||||
%doc CHANGES README
|
||||
%{nginx_datadir}/html/*
|
||||
%{_bindir}/nginx-upgrade
|
||||
%{_sbindir}/nginx
|
||||
%{_mandir}/man3/nginx.3pm*
|
||||
@ -254,8 +278,6 @@ fi
|
||||
%{_initrddir}/nginx
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/nginx
|
||||
%endif
|
||||
%dir %{nginx_confdir}
|
||||
%dir %{nginx_confdir}/conf.d
|
||||
%config(noreplace) %{nginx_confdir}/fastcgi.conf
|
||||
%config(noreplace) %{nginx_confdir}/fastcgi.conf.default
|
||||
%config(noreplace) %{nginx_confdir}/fastcgi_params
|
||||
@ -271,6 +293,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
|
||||
@ -279,8 +302,25 @@ fi
|
||||
%attr(700,%{nginx_user},%{nginx_group}) %dir %{nginx_home_tmp}
|
||||
%attr(700,%{nginx_user},%{nginx_group}) %dir %{nginx_logdir}
|
||||
|
||||
%files filesystem
|
||||
%dir %{nginx_datadir}
|
||||
%dir %{nginx_datadir}/html
|
||||
%dir %{nginx_confdir}
|
||||
%dir %{nginx_confdir}/conf.d
|
||||
%dir %{nginx_confdir}/global.d
|
||||
|
||||
%changelog
|
||||
* Wed Sep 17 2014 Remi Collet <remi@fedoraproject.org> - 1:1.6.2-1.2
|
||||
- create nginx-filesystem sub-package
|
||||
- fix license handling
|
||||
|
||||
* Wed Sep 17 2014 Remi Collet <remi@fedoraproject.org> - 1:1.6.2-1.1
|
||||
- test build for https://bugzilla.redhat.com/1142298
|
||||
- drop all servers from nginx.conf
|
||||
- define default server in conf.d/default.conf
|
||||
- add global.d directory
|
||||
- use fastcgi_param SERVER_NAME $host
|
||||
|
||||
* Wed Sep 17 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1:1.6.2-1
|
||||
- update to upstream release 1.6.2
|
||||
- CVE-2014-3616 nginx: virtual host confusion (#1142573)
|
||||
|
Loading…
Reference in New Issue
Block a user