<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">في السبت، 23 أيار 2020 3:00 م <<a href="mailto:nginx-request@nginx.org">nginx-request@nginx.org</a>> كتب:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send nginx mailing list submissions to<br>
<a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:nginx-request@nginx.org" target="_blank" rel="noreferrer">nginx-request@nginx.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:nginx-owner@nginx.org" target="_blank" rel="noreferrer">nginx-owner@nginx.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of nginx digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. RE: nginx 1.18.0 does not reload on ubuntu 18.04 (Zach Mitchell)<br>
2. Quick question on NGINX cache (Alex Evonosky)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 22 May 2020 17:50:06 +0000<br>
From: Zach Mitchell <<a href="mailto:zlmitche@syr.edu" target="_blank" rel="noreferrer">zlmitche@syr.edu</a>><br>
To: "<a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a>" <<a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a>><br>
Subject: RE: nginx 1.18.0 does not reload on ubuntu 18.04<br>
Message-ID: <<a href="mailto:82f864a533724b8f81a1a0bd438f29b8@syr.edu" target="_blank" rel="noreferrer">82f864a533724b8f81a1a0bd438f29b8@syr.edu</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Finally figured it out. I enabled debug mode on the error log. It turns out setting the worker_rlimit_nofile in the nginx.conf was not working. On nginx startup it would say ?getrlimit(RLIMIT_NOFILE): 1024:4096". I had already checked the security limits and they were set? I confirmed that the workers were using the worker_rlimit_nofile correctly, but the master was not able to reload correctly.<br>
<br>
Solution:<br>
Add LimitNOFILE to the system service, on the next nginx start up the debug logs show the correct nolimt! Reloading now works! Hurray!<br>
<br>
[Service]<br>
LimitNOFILE=60000<br>
<br>
<br>
Zach<br>
<br>
From: nginx <<a href="mailto:nginx-bounces@nginx.org" target="_blank" rel="noreferrer">nginx-bounces@nginx.org</a>> On Behalf Of Zach Mitchell<br>
Sent: Friday, May 22, 2020 11:49 AM<br>
To: <a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a><br>
Subject: RE: nginx 1.18.0 does not reload on ubuntu 18.04<br>
<br>
I?ve also tried that ?ExecReload=/bin/kill -s HUP $MAINPID? which doesn?t work either.<br>
<br>
I?m testing by adding a new location rule and then reloading and it never gets picked up, I have to restart the nginx process and then it finally gets the new config.<br>
<br>
Zach<br>
<br>
From: nginx <<a href="mailto:nginx-bounces@nginx.org" target="_blank" rel="noreferrer">nginx-bounces@nginx.org</a><mailto:<a href="mailto:nginx-bounces@nginx.org" target="_blank" rel="noreferrer">nginx-bounces@nginx.org</a>>> On Behalf Of Moshe Katz<br>
Sent: Friday, May 22, 2020 11:31 AM<br>
To: <a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a><mailto:<a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a>><br>
Subject: Re: nginx 1.18.0 does not reload on ubuntu 18.04<br>
<br>
<br>
I installed nginx on Ubuntu 18.04 from the nginx official repository, and the provided systemd service file is much simpler than yours. It looks like this:<br>
<br>
```<br>
[Unit]<br>
Description=nginx - high performance web server<br>
Documentation=<a href="http://nginx.org/en/docs/" rel="noreferrer noreferrer" target="_blank">http://nginx.org/en/docs/</a><br>
After=network-online.target remote-fs.target nss-lookup.target<br>
Wants=network-online.target<br>
<br>
[Service]<br>
Type=forking<br>
PIDFile=/var/run/nginx.pid<br>
ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf<br>
ExecReload=/bin/kill -s HUP $MAINPID<br>
ExecStop=/bin/kill -s TERM $MAINPID<br>
<br>
[Install]<br>
WantedBy=multi-user.target<br>
```<br>
<br>
You should see if something more like that works for you.<br>
<br>
<br>
On Fri, May 22, 2020 at 10:59 AM Zach Mitchell <<a href="mailto:zlmitche@syr.edu" target="_blank" rel="noreferrer">zlmitche@syr.edu</a><mailto:<a href="mailto:zlmitche@syr.edu" target="_blank" rel="noreferrer">zlmitche@syr.edu</a>>> wrote:<br>
I'm using a nginx 1.18.0 and 1.16.1 and when i perform a systemctl restart nginx, it does not actually reload the configs. nginx -s reload does not work either. Am i missing a configure flag that allows this to work properly?<br>
<br>
Here is my nginx -V<br>
<br>
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)<br>
built with OpenSSL 1.1.1g 21 Apr 2020<br>
TLS SNI support enabled<br>
configure arguments: --prefix=/usr/local/nginx --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_stub_status_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_realip_module --with-compat --with-pcre=../pcre-8.44 --with-pcre-jit --with-zlib=../zlib-1.2.11 --with-openssl=../openssl-1.1.1g --with-openssl-opt=no-nextprotoneg --add-module=../ngx_cache_purge-2.3<br>
<br>
Here is my systemd nginx.service<br>
<br>
[Unit]<br>
Description=The NGINX HTTP and reverse proxy server<br>
After=syslog.target network.target remote-fs.target nss-lookup.target<br>
<br>
[Service]<br>
Type=forking<br>
PIDFile=/usr/local/nginx/logs/nginx.pid<br>
ExecStartPre=/usr/local/sbin/nginx -t -q -g 'daemon on; master_process on;'<br>
ExecStart=/usr/local/sbin/nginx -g 'daemon on; master_process on;'<br>
ExecReload=/usr/local/sbin/nginx -g 'daemon on; master_process on;' -s reload<br>
ExecStop=/bin/kill -s QUIT $MAINPID<br>
PrivateTmp=true<br>
<br>
[Install]<br>
WantedBy=multi-user.target<br>
<br>
I've got a workaround, which i spawn a 2nd process and wait then kill the old, but what is the deal?<br>
<br>
ExecReload=/bin/bash -c "/bin/kill -USR2 $MAINPID && /bin/sleep 5 && /bin/kill -WINCH $MAINPID && /bin/sleep 5 && /bin/kill -QUIT $MAINPID"<br>
<br>
I appreciate the help! Thanks.<br>
<br>
Zach<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a><mailto:<a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a>><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.nginx.org/pipermail/nginx/attachments/20200522/e5652a44/attachment-0001.htm" rel="noreferrer noreferrer" target="_blank">http://mailman.nginx.org/pipermail/nginx/attachments/20200522/e5652a44/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 22 May 2020 21:31:46 -0400<br>
From: Alex Evonosky <<a href="mailto:alex.evonosky@gmail.com" target="_blank" rel="noreferrer">alex.evonosky@gmail.com</a>><br>
To: <a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a><br>
Subject: Quick question on NGINX cache<br>
Message-ID:<br>
<<a href="mailto:CAFZdCup_ADzqkwuC5am_tr2U9cYt20L-oqigoqXY6W57U9_eCw@mail.gmail.com" target="_blank" rel="noreferrer">CAFZdCup_ADzqkwuC5am_tr2U9cYt20L-oqigoqXY6W57U9_eCw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
This should be pretty simple as I really cannot find a good answer on:<br>
<br>
<br>
Running Wordpress with the default permalinks (?page_id=xxx)<br>
<br>
On NGINX conf, I tried:<br>
<br>
location / {<br>
try_files $uri $uri/ /$args /index.php?$args;<br>
}<br>
<br>
And the main page caches OK, but any page the resides on the "?page_id" is<br>
not getting cached. Is there more to the "try_files" that needs applied<br>
for caching of these permalinks?<br>
<br>
<br>
Thank You,<br>
Alex<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.nginx.org/pipermail/nginx/attachments/20200522/73627236/attachment-0001.htm" rel="noreferrer noreferrer" target="_blank">http://mailman.nginx.org/pipermail/nginx/attachments/20200522/73627236/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<br>
------------------------------<br>
<br>
End of nginx Digest, Vol 127, Issue 25<br>
**************************************<br>
</blockquote></div></div></div>