restore and fix nginx.conf patch with sites-enabled support

and fix missing .conf extension in sites-available/default [release 1.27.1-2mamba;Mon Sep 30 2024]
This commit is contained in:
Silvan Calarco 2024-09-30 20:38:21 +02:00
parent 2f5f03f445
commit 0ba086218d
3 changed files with 85 additions and 24 deletions

View File

@ -1,17 +0,0 @@
--- nginx-1.25.1/conf/nginx.conf.orig 2023-07-18 19:01:57.658604388 +0200
+++ nginx-1.25.1/conf/nginx.conf 2023-07-18 19:04:02.998927347 +0200
@@ -8,6 +8,7 @@
#pid logs/nginx.pid;
+include modules-enabled/*.conf;
events {
worker_connections 1024;
@@ -114,4 +115,6 @@
# }
#}
+ include sites-enabled/*;
+
}

View File

@ -0,0 +1,65 @@
--- nginx-1.27.1/conf/nginx.conf.orig 2024-09-30 16:49:15.157424362 +0200
+++ nginx-1.27.1/conf/nginx.conf 2024-09-30 16:50:33.939591668 +0200
@@ -8,6 +8,7 @@
#pid logs/nginx.pid;
+include modules-enabled/*.conf;
events {
worker_connections 1024;
@@ -32,27 +33,27 @@
#gzip on;
- server {
- listen 80;
- server_name localhost;
+ #server {
+ #listen 80;
+ #server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
- location / {
- root html;
- index index.html index.htm;
- }
+ #location / {
+ # root html;
+ # index index.html index.htm;
+ #}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
+ #error_page 500 502 503 504 /50x.html;
+ #location = /50x.html {
+ # root html;
+ #}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
@@ -76,7 +77,7 @@
#location ~ /\.ht {
# deny all;
#}
- }
+ #}
# another virtual host using mix of IP-, name-, and port-based configuration
@@ -114,4 +115,6 @@
# }
#}
+ include sites-enabled/*;
+
}

View File

@ -1,6 +1,6 @@
Name: nginx
Version: 1.27.1
Release: 1mamba
Release: 2mamba
Summary: High Performance Load Balancer, Web Server and Reverse Proxy
Group: System/Servers
Vendor: openmamba
@ -11,7 +11,7 @@ Source: https://github.com/nginx/nginx.git/release-%{version}/nginx-%{ver
Source1: nginx.service
Source2: nginx-fastcgi-php.conf
Source3: nginx-sites-available-default
Patch0: nginx-1.25.1-sites-modules-enabled.patch
Patch0: nginx-1.27.1-sites-modules-enabled.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -37,7 +37,8 @@ High Performance Load Balancer, Web Server and Reverse Proxy.
%prep
%setup -q
#-D -T
#%patch0 -p1
#:<< _EOF
%patch0 -p1
%build
#:<< _EOF
@ -91,7 +92,7 @@ auto/configure \
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/nginx.service
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/nginx/snippets/fastcgi-php.conf
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/nginx/sites-available/default
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/nginx/sites-available/default.conf
install -d -m0755 %{buildroot}%{_sysconfdir}/nginx/sites-{available,enabled}
install -d -m0755 %{buildroot}%{_sysconfdir}/nginx/modules-{available,enabled}
@ -107,7 +108,15 @@ find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';'
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
[ $1 -eq 1 ] && ln -s ../sites-available/default %{_sysconfdir}/nginx/sites-enabled/default
if [ $1 -eq 1 ]; then
# First install
ln -s ../sites-available/default.conf %{_sysconfdir}/nginx/sites-enabled/default.conf
fi
if [ $1 -gt 1 -a -L %{_sysconfdir}/nginx/sites-enabled/default ]; then
# Clean broken symlink from previous releases
rm %{_sysconfdir}/nginx/sites-enabled/default
ln -s ../sites-available/default.conf %{_sysconfdir}/nginx/sites-enabled/default.conf
fi
%systemd_post nginx
:
@ -116,7 +125,7 @@ find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';'
:
%postun
%systemd_postun nginx
%systemd_postun_with_restart nginx
:
%files
@ -134,7 +143,7 @@ find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';'
%dir %{_sysconfdir}/nginx/snippets
%{_sysconfdir}/nginx/snippets/fastcgi-php.conf
%dir %{_sysconfdir}/nginx/sites-available
%config(noreplace) %{_sysconfdir}/nginx/sites-available/default
%config(noreplace) %{_sysconfdir}/nginx/sites-available/default.conf
%dir %{_sysconfdir}/nginx/sites-enabled
%dir %{_sysconfdir}/nginx/modules-available
%dir %{_sysconfdir}/nginx/modules-enabled
@ -158,6 +167,10 @@ find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';'
%{_mandir}/man3/nginx.3pm*
%changelog
* Mon Sep 30 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 1.27.1-2mamba
- restore and fix nginx.conf patch with sites-enabled support
- and fix missing .conf extension in sites-available/default
* Thu Aug 15 2024 Automatic Build System <autodist@openmamba.org> 1.27.1-1mamba
- automatic version update by autodist