Page 1 of 1

Nginx configuration issue

Posted: Thu May 26, 2016 12:26 pm
by random5326
I'm trying to configure nginx so it will also execute aspx files as php but after I add:

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;
}
I get an access denied error on aspx files, can you please tell what is the problem?

Re: Nginx configuration issue

Posted: Tue May 31, 2016 8:49 am
by Elizine
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;
}