KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have an Nginx HTTP server with PHP-FPM set up and almost everything works fine. I want to be able to go to path/to/file and it give me index.php?url=path/to/file , which it does. However, it downloads the actual PHP, it won't execute it in the browser. I'm not sure what is causing this. Nginx configuration: server { listen 80; server_name sandbox.domain.tld; access_log /path/to/domain/log/sandbox.access.log; error_log /path/to/domain/log/sandbox.error.log; location / { root /path/to/sandbox; index index.php; if (!-e $request_filename) { rewrite ^/beta/(.+)$ /beta/index.php?url=$1 break; } } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include /usr/local/nginx/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME /path/to/sandbox$fastcgi_script_name; }
Tags (comma-separated)
Save Edits
Cancel