Welcome! Log In Create A New Profile

Advanced

Hot to enable index.php

Posted by lightdesign 
Hot to enable index.php
June 01, 2011 09:07AM
Hi.
When i open http://mysite.com/dirname/ , i receive nginx`s 404 page.
But http://mysite.com/dirname/index.php working.

How i can enable redirect to index.php as default ?

My Nginx`s conif :


server {
listen 80;
server_name mysite.com;
index index.php;
root /var/www;
access_log /var/log/nginx/localhost.access.log;

location / {
index index.html;

}
location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
}

error_page 404 /404.html;


location ~ \.php$ {
proxy_pass http://127.0.0.1:88;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

}



Edited 1 time(s). Last edit at 06/01/2011 09:10AM by lightdesign.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 278
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