server {
listen 80;
server_name test
www.test; access_log /home/sergey/www/logs/nginx_access.log;
error_log /home/sergey/www/logs/nginx_error.log;
location ~* \.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|docx|xlsx) {
root /home/sergey/www/test/;
index index.html index.php;
access_log off;
expires 30d;
}
location ~ /\.ht {
deny all;
}
# location / {
# proxy_pass
http://127.0.0.1:8080/; # proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-for $remote_addr;
# proxy_set_header Host $host;
# proxy_connect_timeout 60;
# proxy_send_timeout 90;
# proxy_read_timeout 90;
# proxy_redirect
http://127.0.0.1:8080 /;
# proxy_set_header Connection close;
# proxy_pass_header Content-Type;
# proxy_pass_header Content-Disposition;
# proxy_pass_header Content-Length;
# }
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}