-1

I have been trying to parse .ASP files as PHP, but no matter what I try (for hours), it just doesn't work. None of the tutorials/notes I find seem to work for me! Either file(s) get downloaded with their PHP code not being processed, or I get a ridiculous and stupid "Access denied." error (single line, by the way; so I can't say if is it fault from PHP parser or nginx)

I have tried this setup:

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.asp$ {
    fastcgi_split_path_info ^(.+\.asp)(/.+)$;
#   # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
#   # With php5-cgi alone:
#   fastcgi_pass 127.0.0.1:9000;
#   # With php5-fpm:
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.asp;
    include fastcgi_params;
}

What's wrong? :S

0

Problem fixed: From /etc/php5/fpm/pool.d/www.conf, I added the .asp extension to security.limit_extensions. That made the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.