Welcome! Log In Create A New Profile

Advanced

Override index.php for a subdirectory

December 18, 2013 07:44AM
Hi.
I need to override default index file for a subdirectory only.

My actual config (pretty much ubuntu's default):
server {
listen 80 default_server;
root /var/www;
index index.php index.html index.htm;
server_name localhost;
location / {
try_files $uri $uri/ /index.html;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}

Then in a second file I added:
server {
location ~ /work/management_site/ {
fastcgi_index index-maxxer.php;
index index-maxxer.php;
try_files $uri index-maxxer.php?$args;

set $fsn "/index-maxxer.php";
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
}
}


But doesn't work.
How can I accomplish that?

thanks

--
Lorenzo Milesi - lorenzo.milesi@yetopen.it

YetOpen S.r.l. - http://www.yetopen.it/

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

Override index.php for a subdirectory

maxxer December 18, 2013 07:44AM

Re: Override index.php for a subdirectory

Francis Daly December 18, 2013 07:54AM

Re: Override index.php for a subdirectory

maxxer December 18, 2013 10:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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