improved nginx config sample

This commit is contained in:
SJ 2014-06-05 10:08:35 +02:00
parent 196c6d272f
commit 34db7522d2

View File

@ -12,6 +12,10 @@ server {
access_log /var/log/nginx/piler.yourdomain.com-access.log main; access_log /var/log/nginx/piler.yourdomain.com-access.log main;
error_log /var/log/nginx/piler.yourdomain.com-error.log; error_log /var/log/nginx/piler.yourdomain.com-error.log;
gzip on;
gzip_types text/plain application/xml text/css;
gzip_vary on;
location / { location / {
index index.php index.html; index index.php index.html;
} }
@ -34,6 +38,9 @@ server {
include fastcgi_params; include fastcgi_params;
} }
location ~* \.(ico|css|js|gif|jpe?g|png)$ {
expires 2w;
}
rewrite /search.php /index.php?route=search/search&type=simple; rewrite /search.php /index.php?route=search/search&type=simple;
rewrite /advanced.php /index.php?route=search/search&type=advanced; rewrite /advanced.php /index.php?route=search/search&type=advanced;