<div dir="ltr"><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div>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:</div><div><br></div><div>```</div><div>[Unit]<br>Description=nginx - high performance web server<br>Documentation=<a href="http://nginx.org/en/docs/">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></div><div>```</div><div><br></div><div>You should see if something more like that works for you.</div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 22, 2020 at 10:59 AM Zach Mitchell <<a href="mailto:zlmitche@syr.edu">zlmitche@syr.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_-3585523392397090768WordSection1">
<p class="MsoNormal">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?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-top:none;border-right:none;border-left:none;border-bottom:1pt solid windowtext;padding:0in 0in 1pt">
<p class="MsoNormal" style="border:none;padding:0in">Here is my nginx -V<u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0in"><u></u> <u></u></p>
</div>
<p class="MsoNormal">built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)<u></u><u></u></p>
<p class="MsoNormal">built with OpenSSL 1.1.1g 21 Apr 2020<u></u><u></u></p>
<p class="MsoNormal">TLS SNI support enabled<u></u><u></u></p>
<div style="border-top:none;border-right:none;border-left:none;border-bottom:1pt solid windowtext;padding:0in 0in 1pt">
<p class="MsoNormal" style="border:none;padding:0in">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<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-top:none;border-right:none;border-left:none;border-bottom:1pt solid windowtext;padding:0in 0in 1pt">
<p class="MsoNormal" style="border:none;padding:0in">Here is my systemd nginx.service<u></u><u></u></p>
<p class="MsoNormal" style="border:none;padding:0in"><u></u> <u></u></p>
</div>
<p class="MsoNormal">[Unit]<u></u><u></u></p>
<p class="MsoNormal">Description=The NGINX HTTP and reverse proxy server<u></u><u></u></p>
<p class="MsoNormal">After=syslog.target network.target remote-fs.target nss-lookup.target<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">[Service]<u></u><u></u></p>
<p class="MsoNormal">Type=forking<u></u><u></u></p>
<p class="MsoNormal">PIDFile=/usr/local/nginx/logs/nginx.pid<u></u><u></u></p>
<p class="MsoNormal">ExecStartPre=/usr/local/sbin/nginx -t -q -g 'daemon on; master_process on;'<u></u><u></u></p>
<p class="MsoNormal">ExecStart=/usr/local/sbin/nginx -g 'daemon on; master_process on;'<u></u><u></u></p>
<p class="MsoNormal">ExecReload=/usr/local/sbin/nginx -g 'daemon on; master_process on;' -s reload<u></u><u></u></p>
<p class="MsoNormal">ExecStop=/bin/kill -s QUIT $MAINPID<u></u><u></u></p>
<p class="MsoNormal">PrivateTmp=true<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">[Install]<u></u><u></u></p>
<div style="border-top:none;border-right:none;border-left:none;border-bottom:1pt solid windowtext;padding:0in 0in 1pt">
<p class="MsoNormal" style="border:none;padding:0in">WantedBy=multi-user.target<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I've got a workaround, which i spawn a 2nd process and wait then kill the old, but what is the deal?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-top:1pt solid windowtext;border-left:none;border-bottom:1pt solid windowtext;border-right:none;padding:1pt 0in">
<p class="MsoNormal" style="border:none;padding:0in">ExecReload=/bin/bash -c "/bin/kill -USR2 $MAINPID && /bin/sleep 5 && /bin/kill -WINCH $MAINPID && /bin/sleep 5 && /bin/kill -QUIT $MAINPID"<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I appreciate the help! Thanks.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b><span style="font-family:"Trebuchet MS",sans-serif;color:rgb(159,52,0)">Zach</span></b><u></u><u></u></p>
</div>
</div>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></blockquote></div>