default_server directive not respected

2015-01-29 Thread Lorenzo Raffio
I have multiple files each with a config for a different vhost. On one of these config files (included in the main nginx config file) I set the default_server directive: server { listen 80; listen 443 ssl default_server spdy; server_name 188.166.X.XXX; root /var/www/default;

Disable SSL3 handshake errors

2014-10-11 Thread Lorenzo Raffio
I disabled SSL3 in ssl_protocols (ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ). So PCs with old browsers (example: IE on WinXP) fail to do the handshake and I have my nginx logs full of these errors ​​ : SSL_do_handshake() failed (SSL: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version numb

Re: access logs hang

2014-10-09 Thread Lorenzo Raffio
Thanks for the reply. I compiled nginx from source, 1.7.5. I'm on Ubuntu 14.04. I know there's a log rotation function built-in but I prefer to work things out by myself. :DSo I created this script to automatically rotate my logs:find /var/www/ -ipath */logs/access.log.gz -execdir mv "{}" "old/`

Re: Combine location blocks with same content

2014-10-08 Thread Lorenzo Raffio
Thanks B.R., it works now. :-)___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Access logs hang

2014-10-08 Thread Lorenzo Raffio
>From time to time access logs (for which I don't have a logrotation and >manually rotate them) just "hang" and no lines are written. Same file and >folder. No change in Nginx config! And the fact seems totally random, it's not >related to file size, it happens to files some kilobytes long, and

Combine location blocks with same content

2014-10-06 Thread Lorenzo Raffio
location ^~ /categoria/personale-scolastico/area-docenti/ {                 auth_basic                          "Restricted";                 auth_basic_user_file    /var/www/domain/.pswd_docenti;                 try_files $uri $uri/    /index.php?$args;                 include                    

Targeting homepage (not sub pages/dirs/)

2014-01-17 Thread Lorenzo Raffio
What should I add to this directive to target also the home page (root of the website, e.g. website.com)? I already have 'index.php' in the directive but what if I visit website.com(without /index.php)? if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/

Re: fastcgi_cache_path empty

2014-01-16 Thread Lorenzo Raffio
Thanks Steve for the reply!! Ok, so tell me if I understood correcty. You just have in your "vhost" server block this: fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:10m max_size=1000m inactive=60m; and then you have a file /etc/nginx/microcache with # Setup var defaul

Re: fastcgi_cache_path empty

2014-01-16 Thread Lorenzo Raffio
No one? :) 2014/1/13 Lorenzo Raffio > I wanted to try fastcgi_cache on my nginx 1.5.8 as shown here > http://seravo.fi/2013/optimizing-web-server-performance-with-nginx-and-php > > In nginx conf, http section, I added: > > fastcgi_cache_path /var/cache/nginx levels=1:2 keys_z

fastcgi_cache_path empty

2014-01-13 Thread Lorenzo Raffio
I wanted to try fastcgi_cache on my nginx 1.5.8 as shown here http://seravo.fi/2013/optimizing-web-server-performance-with-nginx-and-php In nginx conf, http section, I added: fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:10m max_size=1000m inactive=60m; In server section:

Force ppt(x) and pps(x) to be downloaded instead of being served as plain text

2013-12-06 Thread Lorenzo Raffio
Nginx 1.5.7, ppt(x) and pps(x) are served as plain text (of course with strange characters) by nginx. How can I have them always as a download?___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

access_log both compressed and uncompressed

2013-11-24 Thread Lorenzo Raffio
In my "vhost" declaration I have: access_log /WEBSITE_DIR/logs/access.log.gz combined gzip; Problem is I get 2 files, an access.log.gz and an access.log Why? I want just the .log.gz one..___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mai