Welcome! Log In Create A New Profile


Stupid question

April 13, 2010 03:42PM
I have this config:

server {
listen 8080;
server_name localhost;

access_log /var/log/nginx/site.access.log;
error_log /var/log/nginx/site.error.log;
charset utf-8;

if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;

location / {
root /var/www/nginx-default/site;
index index.html;
try_files $uri $uri/ $uri/site.html;
location = /favicon.ico {
return 204;
location ~ \.(php|html)$ {
fastcgi_pass localhost:1234;
include fastcgi_params;
fastcgi_index index.html;
fastcgi_param SCRIPT_FILENAME
fastcgi_param DOCUMENT_ROOT /var/www/nginx-default/site;
fastcgi_intercept_errors on;

error_page 404 403 /40x.html;
location = /40x.html {
root /var/www/nginx-default/site/epages;

All my files are .html. Any regular page will have its php parsed, but
all error pages will only parse html. I.e., if i have this code:

error <?php echo '404'; ?>

The php will be parsed if it's not an error page. What am i missing here?

TIA and sorry for a basic question,

() ascii-rubanda kampajno - kontraŭ html-a retpoŝto
/\ ascii ribbon campaign - against html e-mail

nginx mailing list
Subject Author Posted

Stupid question

vesperto April 13, 2010 03:42PM

Re: Stupid question

Maxim Dounin April 13, 2010 04:36PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 61
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready