HTML as PHP
Silvio Siefke
siefke_listen at web.de
Tue Apr 17 22:17:49 UTC 2012
Hello,
i want html files use as php file. So i have write the follow config:
/etc/nginx/nginx.conf
server {
listen 80;
server_name silviosiefke_de;
access_log /var/www/silviosiefke_de/log/access_log main;
error_log /var/www/silviosiefke_de/log/error_log info;
location / {
root /var/www/silviosiefke_de/htdocs;
index index.html index.htm index.php;
}
#location /article-(\d+)\.html$ {
#try_files $uri $uri/ /blogdetail.html?id=$1;
#}
# pass the PHP scripts to FastCGI
location ~ \.(php|htm|html)$ {
#location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/silviosiefke_de/htdocs$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
When i make restart nginx and go on the side i read only Access denied.
In the log i have:
access.log
192.168.0.22 - - [18/Apr/2012:00:15:54 +0200] "GET /blog/manage.html
HTTP/1.1" 403 25 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de-de)
AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ Midori/0.4" "-"
No entrys in the error.log. Has someone an idea?
Regards
Silvio
More information about the nginx
mailing list