critique my config file

2017-04-26 Thread tommygunner
I am using Nginx 1.13 and have removed all the "if"s from the config file and would now like someone to analyse it, look at the rewrites, etc if possible. It works fine but seems a bit unorganized and I'm wondering if there are some duplicate things. I have created a bunch of 444 locations to drop

Re: remove if from code

2017-04-26 Thread tommygunner
Thanks! I got it to work but had to put my fastcgi stuff inside. location ~ \.php$ { try_files $uri /index.php; # fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; expires off; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php;

remove if from code

2017-04-25 Thread tommygunner
I am using Nginx 1.13 and have read that using "if" is a poor solution. I have looked through my configuration file and found one and would like to rewrite it without the "if". Does anyone know how to rewrite this snippet? ## Execute PHP Scripts using FastCGI location ~ \.php(/.*)? {

Limiting gzip_static to two directories.

2015-01-16 Thread tommygunner
I have gzip enabled in Nginx as well as gzip_static. I am trying to limit gzip_static to just one or two sections. There are pre-compressed files inside the directory: media/po_compressor/ along with sub directories of this such as: media/po_compressor/4/js media/po_compressor/4/css Here is what