nginx php-fpm keeps downloading files
Posted
by
Sam Williams
on Server Fault
See other posts from Server Fault
or by Sam Williams
Published on 2011-02-05T18:20:08Z
Indexed on
2012/09/11
21:40 UTC
Read the original article
Hit count: 217
vhost:
server {
listen *:8080;
location / {
root /var/www/default/pub;
index index.php;
# if file exists return it right away
if (-f $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php$1 last;
break;
}
}
# serve static files directly
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
access_log off;
expires max;
}
location ~* \.php$ {
# By all means use a different server for the fcgi processes if you need to
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
http://192.168.135.128/index.php loads just fine...
http://192.168.135.128/public_/html/index.php downloads...
© Server Fault or respective owner