Nginx configuration issue
-
- Posts: 1
- Joined: Thu May 26, 2016 12:21 pm
Nginx configuration issue
I'm trying to configure nginx so it will also execute aspx files as php but after I add:
I get an access denied error on aspx files, can you please tell what is the problem?
Code: Select all
location ~ \.aspx$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass 127.0.0.1:9002;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
Re: Nginx configuration issue
Try this code -
Code: Select all
location ~ \.php$ {
include /etc/nginx/fcgi_params; #or whatever you named it
fastcgi_pass 127.0.0.1:9000;
}