Question

info.php starts to download instead of opening

  • Posted May 13, 2014

HI , I setting up LEMP on Ubuntu 14.04 by using this tutorial , https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

I am also hosting 2 domain name on a single droplet . I have successfully setup Nginx virtual host .

Any idea why does info.php download rather than opening. Can you guys guide me on how to troubleshoot the issue .

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You need to uncomment the lines, as in delete the <strong>#</strong> at the beginning of each line. So it should look like this: <br><pre>#pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 <br> <br>location ~ .php$ { <br> fastcgi_split_path_info ^(.+.php)(/.+)$; <br> # NOTE: You should have “cgi.fix_pathinfo = 0;” in php.ini <br> <br> try_files $uri =404; <br> # With php5-cgi alone: <br> fastcgi_pass 127.0.0.1:9000; <br> # With php5-fpm: <br> fastcgi_pass unix:/var/run/php5-fpm.sock; <br> fastcgi_index index.php; <br> include fastcgi_params; <br>}</pre>

HI Andrew , <br>please see below my Ngix configuration . <br> <br># pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 <br> # <br> #location ~ .php$ { <br> # fastcgi_split_path_info ^(.+.php)(/.+)$; <br> # # NOTE: You should have “cgi.fix_pathinfo = 0;” in php.ini <br> # <br> try_files $uri =404; <br> # # With php5-cgi alone: <br> # fastcgi_pass 127.0.0.1:9000; <br> # # With php5-fpm: <br> # fastcgi_pass unix:/var/run/php5-fpm.sock; <br> # fastcgi_index index.php; <br> # include fastcgi_params; <br>
<br>is it correct ? looks the same to me , I am not sure . What do you think Andrew.

Hi Joss! <br> <br>Could you post your Nginx configuration? The location block should look something like: <br> <br><pre> <br> location ~ .php$ { <br> try_files $uri =404; <br> fastcgi_split_path_info ^(.+.php)(/.+)$; <br> fastcgi_pass unix:/var/run/php5-fpm.sock; <br> fastcgi_index index.php; <br> include fastcgi_params; <br> } <br></pre> <br> <br>