Welcome! Log In Create A New Profile

Advanced

HTML as PHP

Silvio Siefke
April 17, 2012 06:18PM
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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

HTML as PHP

Silvio Siefke April 17, 2012 06:18PM

Re: HTML as PHP

Cliff Wells April 17, 2012 06:58PM

Re: HTML as PHP

siefke_listen@web.de April 17, 2012 07:04PM

Re: HTML as PHP

Cliff Wells April 17, 2012 07:14PM

Re: HTML as PHP

siefke_listen@web.de April 17, 2012 07:20PM

Re: HTML as PHP

Cliff Wells April 17, 2012 07:12PM

Re: HTML as PHP

siefke_listen@web.de April 17, 2012 07:28PM

Re: HTML as PHP

Silvio Siefke April 29, 2012 01:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 313
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready