server {
listen 80;
server_name vlad.vladstudio.com;
client_max_body_size 30m;
access_log /var/log/nginx/vladstudio.com.access.log;
error_log /dev/null crit;
index index.php index.html index.htm;
root /var/www/vladstudio.com/data;
# Url cleaning - removing multiple slashes
set $clean_uri $scheme://$host$request_uri;
if ($uri ~ //) {
rewrite ^ $scheme://$host$uri$is_args$args? permanent;
}
location ~* \.(jpg|jpeg|gif|avi|png|css|js|ico|flv|mp4|xml|swf|rar|otf|zip|pdf|mp3)$ {
access_log off;
expires 30d;
}
location / {
rewrite ^/(en|de|ru)/test/test.php /test/test.php?lang=$1;
}
location ~* \.(php)$ {
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_intercept_errors on;
fastcgi_read_timeout 600;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
location / {
rewrite ^/(en|de|ru)/test/test.php /test/test.php?lang=$1;
}