Welcome! Log In Create A New Profile

Advanced

index directive not taking effect in case of alias

August 22, 2012 07:07AM
I would like the pnp4nagios app to be accessed as: http://server/pnp4nagios/. With this URL it gives a 403 Forbidden error. It works when I give: http://server/pnp4nagios/index.php.
What might be wrong?

Here is the pnp4nagios location config:

location ~ /pnp4nagios {
alias $pnp4nagiosbase/share;
auth_basic "Nagios Restricted"; ## Message shown in login window
auth_basic_user_file $nagiosbase/etc/htpasswd.users ; ## See /etc/nginx/htpassword
index index.php;
try_files $uri $uri/ @handler ; ## If missing pass the URI to Magento's front handler

location ~ /([^\/]*\.php)$ {
alias $pnp4nagiosbase/share/$1;
#include /etc/nginx/fastcgi.conf;
fastcgi_pass $fcgipass;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
include fastcgi_params; ## See /etc/nginx/fastcgi_params
}

location ~ \.php$ {
#include /etc/nginx/fastcgi.conf;
include fastcgi_params; ## See /etc/nginx/fastcgi_params
fastcgi_pass $fcgipass;
}

}

Thanks,
Yash
Subject Author Posted

index directive not taking effect in case of alias

yashgt August 22, 2012 07:07AM

Re: index directive not taking effect in case of alias

Maxim Dounin August 22, 2012 07:36AM

Re: index directive not taking effect in case of alias

kustodian August 24, 2012 09:19AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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