Nginx not reloading after SIGHUP in freebsd
Hello all! If I issue a "kill -s HUP" from root to the pid I find on my freeBSD machine it does'nt reload the configuration. If I issue a "service nginx reload" it does. Is it normal? Here is the output of my "pkg info nginx" which shoud carry all the relevant informations: nginx-devel-1.19.3_3 Robust and small WWW server py37-certbot-nginx-1.8.0 NGINX plugin for Certbot root@brunocover:~ # pkg info nginx-devel nginx-devel-1.19.3_3 Name : nginx-devel Version: 1.19.3_3 Installed on : Wed Nov 11 20:21:34 2020 CET Origin : www/nginx-devel Architecture : FreeBSD:11:i386 Prefix : /usr/local Categories : www Licenses : BSD2CLAUSE Maintainer : o...@freebsd.org WWW: https://nginx.org/ Comment: Robust and small WWW server Options: AJP: off ARRAYVAR : off AWS_AUTH : off BROTLI : off CACHE_PURGE: off CLOJURE: off COOKIE_FLAG: off CT : off DEBUG : off DEBUGLOG : off DEVEL_KIT : off DRIZZLE: off DSO: on DYNAMIC_HC : off DYNAMIC_UPSTREAM: off ECHO : off ENCRYPTSESSION : off FILE_AIO : on FORMINPUT : off GOOGLE_PERFTOOLS: off GRIDFS : off GSSAPI_HEIMDAL : off GSSAPI_MIT : off HEADERS_MORE : off HTTP : on HTTPV2 : on HTTP_ACCEPT_LANGUAGE: off HTTP_ADDITION : on HTTP_AUTH_DIGEST: off HTTP_AUTH_KRB5 : off HTTP_AUTH_LDAP : off HTTP_AUTH_PAM : off HTTP_AUTH_REQ : on HTTP_CACHE : on HTTP_DAV : on HTTP_DAV_EXT : off HTTP_DEGRADATION: off HTTP_EVAL : off HTTP_FANCYINDEX: off HTTP_FLV : on HTTP_FOOTER: off HTTP_GEOIP2: off HTTP_GUNZIP_FILTER: on HTTP_GZIP_STATIC: on HTTP_IMAGE_FILTER: off HTTP_IP2LOCATION: off HTTP_IP2PROXY : off HTTP_JSON_STATUS: off HTTP_MOGILEFS : off HTTP_MP4 : on HTTP_MP4_H264 : off HTTP_NOTICE: off HTTP_PERL : off HTTP_PUSH : off HTTP_PUSH_STREAM: off HTTP_RANDOM_INDEX: on HTTP_REALIP: on HTTP_REDIS : off HTTP_RESPONSE : off HTTP_REWRITE : on HTTP_SECURE_LINK: on HTTP_SLICE : on HTTP_SLICE_AHEAD: off HTTP_SSL : on HTTP_STATUS: on HTTP_SUB : on HTTP_SUBS_FILTER: off HTTP_TARANTOOL : off HTTP_UPLOAD: off HTTP_UPLOAD_PROGRESS: off HTTP_UPSTREAM_CHECK: off HTTP_UPSTREAM_FAIR: off HTTP_UPSTREAM_STICKY: off HTTP_VIDEO_THUMBEXTRACTOR: off HTTP_XSLT : off HTTP_ZIP : off ICONV : off IPV6 : on LET: off LINK : off LUA: off MAIL : on MAIL_IMAP : off MAIL_POP3 : off MAIL_SMTP : off MAIL_SSL : on MEMC : off MODSECURITY3 : off NAXSI : off NJS: off OPENTRACING: off PASSENGER : off POSTGRES : off RDS_CSV: off RDS_JSON : off REDIS2 : off RTMP : off SET_MISC : off SFLOW : off SHIBBOLETH : off SLOWFS_CACHE : off SMALL_LIGHT: off SRCACHE: off STREAM : on STREAM_REALIP : on STREAM_SSL : on STREAM_SSL_PREREAD: on THREADS: on VOD: off VTS: off WEBSOCKIFY : off WWW: on XSS: off Shared Libs required: libpcre.so.1 Annotations: FreeBSD_version: 1104001 cpe: cpe:2.3:a:nginx:nginx:1.19.3:freebsd11:x86:3 repo_type : binary repository : FreeBSD Flat size : 1.19MiB Cheers && thanks in advance, Luciano. -- /"\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 02485781 FAX: +39 0248028247 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Nginx 1.17.6 ignores kill -HUP
On Fri, 20 Dec 2019 16:23:26 +0100 Luciano Mannucci wrote: > I have an istallation of nginx in a FreeBSD PPC64 server (running > 11.3 RELEASE) which seems to ignore kill -HUP: it doesn't reload > configuration and doesn't log the fact that kill has reached it, even > if I set the debug level in error_log to "debug". Further investigation: it does re-read the config. It just doesn't log that it did it. This may be a problem because *sometime* it doesn't reload the ssl certificates not noticing that they have changed. Do I need to put something special in the conf file to achieve that? Thanks again, Luciano. -- /"\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Nginx 1.17.6 ignores kill -HUP
I have an istallation of nginx in a FreeBSD PPC64 server (running 11.3 RELEASE) which seems to ignore kill -HUP: it doesn't reload configuration and doesn't log the fact that kill has reached it, even if I set the debug level in error_log to "debug". nginx -V says: nginx version: nginx/1.17.6 built by gcc 9.2.0 (FreeBSD Ports Collection) built with OpenSSL 1.0.2t 10 Sep 2019 TLS SNI support enabled configure arguments: --prefix=/usr/local --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx_pool/nginx.pid --user=httpd --group=nagcmd --with-cc=/usr/local/bin/gcc9 --with-cpp=/usr/local/bin/cpp9 --with-cpu-opt=ppc64 --with-http_dav_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-http_v2_module --with-google_perftools_module --with-mail --with-mail_ssl_module Have I missed something? where should I look to see what happens? Thanks in advance, Luciano. -- /"\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Nginx Directory Autoindex
On Fri, 2 Mar 2018 10:33:45 + Jameswrote: > I'd like the option of order by date, "ls -t", "ls -rt". This helps > because the text order of numbers is "10 11 8 9", see: > > http://nginx.org/download/ Well, this is way less trivial than simply add a flag to reverse sort order. It belongs indeed to fancyindex, that already does that: fancyindex_default_sort Syntax: fancyindex_default_sort [name | size | date | name_desc | size_desc | date_desc] Though you need to compile your own nginx to get that working (and follow the module installation instructions :-). Cheers, Luciano. -- /"\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Nginx Directory Autoindex
On Thu, 1 Mar 2018 19:45:27 +0300 Roman Arutyunyanwrote: > Just in case you'll get back to XML/XSLT, here's a simple configuration to > sort the files: Many thanks! I'll give it a try. Cheers, Luciano. -- /"\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Nginx Directory Autoindex
On Thu, 1 Mar 2018 12:16:34 + Miguel Cwrote: > there's a default sorting option for name/data etc > https://github.com/aperezdc/ngx-fancyindex#fancyindex-default-sort > > I do see a default_sort as a directive but not for "ascending" "descending" > (doesn't since supper hard to implement in the code though, but I'm not a C > expert Yes, it sould'nt be that hard... :) > Vladimir Homutov just suggested a different approach with the autoindex > module and xslt that seems to serve you're need, and that way there's no > need to install a 3rd party moduel :) I'm not comfortable with XML/XSLT, so I just made a small hack to the original autoindex that is quite enough for me (=works and made my users happy :). If there is some interest I can post my patch to the apropriate list (nginx devel, if I recall correctly :). Cheers, Luciano. -- /"\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Nginx Directory Autoindex
On Wed, 28 Feb 2018 23:30:35 + Miguel Cwrote: > I'm unsure if thats possible without 3rd party module... > > I've used fancyindex before when I wanted sorting. I don't find fancyindex module in 1.13.9. It seems that some of its features are now in autoindex. It is probably trivial to add an option to the configuration, something like "autoindex_reverse_sort" (set to off by default), though I don'nt know if it would be usefull for other nginx users... Thanks for your answer, Luciano. -- /"\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Nginx Directory Autoindex
Hello all, I have a directory served by nginx via autoindex (That works perfectly as documented :). I need to show the content in reverse order (ls -r), is there any rather simple method? Thanks in advance, Luciano. -- /"\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Rewrite rules from Apache again
On Wed, 11 Jun 2014 18:05:50 +0100 Francis Daly fran...@daoine.org wrote: On Wed, 11 Jun 2014 18:05:50 +0100 Francis Daly fran...@daoine.org wrote: The rewrite that you want doesn't happen, because the request /en/privacy.php is handled in: location ~ \.php$ { location / { location ^~ /en/ { location = /en/pagina.php { location ~ \.php$ { ...that location, and not in the one two above it. Good luck with it, Solved! Moving all the rewrite rules outside the location to the server section makes them work as expected. The regexp takes care of the different rewritings to be done. Maaany thanks again, Luciano. -- /\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Rewrite rules from Apache again
On Tue, 10 Jun 2014 22:43:05 +0100 Francis Daly fran...@daoine.org wrote: The rest of the config? :) Well, I've posted it in my previous request for help. Beeing longish I tried to spare some bandwith... :) == server { rewrite ^/(.*)_k(.*).htm$ /pagina.php?k=$2 ; rewrite ^/privacy.php$ /pagina.php?k=privacy ; Wow! I had it under location / Moving it to server level and adding a break seems to make it work! location = /pagina.php { return 200 I got $uri$is_args$args from $request_uri\n; } Many thanks for this elegant way of debugging this kind of configuration problems. What do you have that is different? Another problem :( If I try the same thing in a subdirectory, it doesn't work. In the error log I get: 2014/06/11 17:51:46 [error] 602#0: *264 FastCGI sent in stderr: Primary script unknown while reading response header from upstream, client: 212.121.88.183, server: new.assirm.it, request: GET /en/privacy.php HTTP/1.1, upstream: fastcgi://127.0.0.1:9004, host: new.assirm.it, referrer: http://new.assirm.it/en/history_khistory.htm; It seems that the location = that I've put to intercept the rewrite doesn't match. My configuration, now looks like this: server { listen 212.45.144.216:80 default_server; server_name new.assirm.it test.assirm.it; access_log /dati/log/http/assirm/access.log; error_log /dati/log/http/assirm/error_new.log; rewrite_log on; rewrite ^/ultime-news.php$ /archivio-news.php?last=1 ; rewrite ^/(.*)_news(.*).htm$ /news.php?id=$2 ; rewrite ^/(.*)_ev(.*).htm$ /evento.php?id=$2 ; rewrite ^/(.*)_att(.*).htm$ /attivita.php?id=$2 ; rewrite ^/(.*)_k(.*).htm$ /pagina.php?k=$2 ; rewrite ^/(.*)_sk(.*).htm$ /stampa-contenuto.php?k=$2 ; rewrite ^/(.*)_sn(.*).htm$ /stampa-news.php?id=$2 ; rewrite ^/(.*)_a(.*).htm$ /associato.php?id=$2$args ; rewrite ^/(.*)_p(.*).htm$ /mypost.php?id=$2$args ; rewrite ^/ricerca-(.*).htm$ /risultati.php?s=$1goo=1 ; rewrite ^/privacy.php$ /pagina.php?k=privacy break; location ~ \.php$ { root /dati/httpd/web_assirm/sito_nginx; fastcgi_pass 127.0.0.1:9004; fastcgi_index index.php; include /etc/nginx/fastcgi.conf; } location / { root /dati/httpd/web_assirm/sito_nginx; index index.html index.htm index.php home.html welcome.html; } location ^~ /en/ { root /dati/httpd/web_assirm/sito_nginx; index index.html index.htm index.php home.html; rewrite ^/en/ultime-news.php$ /en/archivio-news.php?last=1 ; rewrite ^/en/(.*)_news(.*).htm$ /en/news.php?id=$2 ; rewrite ^/en/(.*)_ev(.*).htm$ /en/evento.php?id=$2 ; rewrite ^/en/(.*)_att(.*).htm$ /en/attivita.php?id=$2 ; rewrite ^/en/(.*)_k(.*).htm$ /en/pagina.php?k=$2 ; rewrite ^/en/(.*)_sk(.*).htm$ /en/stampa-contenuto.php?k=$2 ; rewrite ^/en/(.*)_sn(.*).htm$ /en/stampa-news.php?id=$2 ; rewrite ^/en/(.*)_a(.*).htm$ /en/associato.php?id=$2$args ; rewrite ^/en/(.*)_p(.*).htm$ /en/mypost.php?id=$2$args ; rewrite ^/en/(.*)_wit(.*).htm$ /en/wit.php?c=$2$args ; rewrite ^/en/ricerca-(.*).htm$ /en/risultati.php?s=$1goo=1 ; rewrite ^/en/privacy.php /en/pagina.php?k=privacy ; location = /en/pagina.php { return 200 I got $uri$is_args$args from $request_uri\n; } location ~ \.php$ { index index.html index.htm index.php home.html; fastcgi_pass 127.0.0.1:9004; fastcgi_index index.php; include /etc/nginx/fastcgi.conf; } } } -- /\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Switching to nginx: php and rewrite rules from apache
On Sat, 7 Jun 2014 11:39:55 +0100 Francis Daly fran...@daoine.org wrote: add something like location ~ \.php$ { fastcgi_pass 127.0.0.1:9004; } so that nginx knows to handle this request the way you want it to. Works! :-) :) I had to add few other things (it was looking for index.html instead of .php) and now it seems fine. Mny thanks, Luciano. -- /\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Rewrite rules from Apache again
I'm still trying to move everything from apache to nginx. I've successfully translated some rules from the .htaccess: RewriteRule ^(.*)_k(.*)\.htm$ pagina.php?k=$2 works pretty weff if turned into: rewrite ^/(.*)_k(.*).htm$ /pagina.php?k=$2 ; while RewriteRule ^privacy.php$ pagina.php?k=privacy does not work if translated as: rewrite ^/privacy.php$ /pagina.php?k=privacy ; the request is passed unchanged and I get a 404 error for the /privacy.php page does'nt exist. What did I miss? AdvThanksAnce, Luciano. -- /\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Switching to nginx: php and rewrite rules from apache
Hello list, I'm moving a bunch of sites from Apache to nginx 1.5.13 :). Everything went fine for the static ones and for the sites under wp or joomla. I have one site in php developped by the customer that seemed ok till I discovered that it has a subdirectory with its own .htacess file. Trying to add the rewriting rules makes the php dead, only in the cited subdirectory. Here is my config: server { listen 212.45.144.216:80 default_server; server_name new.assirm.it test.assirm.it; access_log /dati/log/http/assirm/access.log; error_log /dati/log/http/assirm/error_new.log; rewrite_log on; #charset koi8-r; location ~ \.php$ { root /dati/httpd/web_assirm/sito_nginx; fastcgi_pass 127.0.0.1:9004; fastcgi_index index.php; include /etc/nginx/fastcgi.conf; } location / { root /dati/httpd/web_assirm/sito_nginx; index index.html index.htm index.php home.html welcome.html; #try_files $uri $uri/ /index.php?$args; rewrite ^/ultime-news.php$ /archivio-news.php?last=1 ; rewrite ^/(.*)_news(.*).htm$ /news.php?id=$2 ; rewrite ^/(.*)_ev(.*).htm$ /evento.php?id=$2 ; rewrite ^/(.*)_att(.*).htm$ /attivita.php?id=$2 ; rewrite ^/(.*)_k(.*).htm$ /pagina.php?k=$2 ; rewrite ^/(.*)_sk(.*).htm$ /stampa-contenuto.php?k=$2 ; rewrite ^/(.*)_sn(.*).htm$ /stampa-news.php?id=$2 ; rewrite ^/(.*)_a(.*).htm$ /associato.php?id=$2$args ; rewrite ^/(.*)_p(.*).htm$ /mypost.php?id=$2$args ; rewrite ^/ricerca-(.*).htm$ /risultati.php?s=$1goo=1 ; rewrite ^/privacy.php$ /pagina.php?k=privacy ; } location ^~ /en/ { rewrite ^/en/ultime-news.php$ /en/archivio-news.php?last=1 break; rewrite ^/en/(.*)_news(.*).htm$ /en/news.php?id=$2 break; rewrite ^/en/(.*)_ev(.*).htm$ /en/evento.php?id=$2 break; rewrite ^/en/(.*)_att(.*).htm$ /en/attivita.php?id=$2 break; rewrite ^/en/(.*)_k(.*).htm$ /en/pagina.php?k=$2 break; rewrite ^/en/(.*)_sk(.*).htm$ /en/stampa-contenuto.php?k=$2 break; rewrite ^/en/(.*)_sn(.*).htm$ /en/stampa-news.php?id=$2 break; rewrite ^/en/(.*)_a(.*).htm$ /en/associato.php?id=$2$args break; rewrite ^/en/(.*)_p(.*).htm$ /en/mypost.php?id=$2$args break; rewrite ^/en/(.*)_wit(.*).htm$ /en/wit.php?c=$2$args break; rewrite ^/en/ricerca-(.*).htm$ /en/risultati.php?s=$1goo=1 break; rewrite ^/en/privacy.php$ /en/pagina.php?k=privacy break; } #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; } } What did I have wrong? Many thanks to all, Luciano. -- /\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: Switching to nginx: php and rewrite rules from apache
On Sat, 7 Jun 2014 10:08:54 +0100 Francis Daly fran...@daoine.org wrote: On Sat, Jun 07, 2014 at 10:50:05AM +0200, Luciano Mannucci wrote: Hi there, What did I have wrong? You left out some useful information: * what request do you make? new.assirm.it/en/ * what response do you get? The index.php page source. * what response do you want? The php interpreted result. Many thanks again, Luciano. -- /\ /Via A. Salaino, 7 - 20144 Milano (Italy) \ / ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250 X AGAINST HTML MAIL/ E-MAIL: posthams...@sublink.sublink.org / \ AND POSTINGS/ WWW: http://www.lesassaie.IT/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx