Nginx downloading php files






















Viewed k times. Others "location" are commented Improve this question. Paulo Boaventura 1, 1 1 gold badge 7 7 silver badges 26 26 bronze badges. Apeiron Apeiron 1, 2 2 gold badges 11 11 silver badges 21 21 bronze badges. That's all we can tell you though since you didn't show us any of your config. Thanks Brad — Apeiron. Whichever file or files you put your config in. The relevant part being Show 4 more comments. Active Oldest Votes.

Improve this answer. Jack M. Joy, tried your suggestion but it didn't worked. For php7. Show 10 more comments. I think the restart and incognito mode helped me.

Thank a ton for the noobness we can do. Thanks a lot. This made it for me, also after hours trying a lot of other solutions suggested. It was strange to me that my site worked on IE and chrome while in mozilla it downloded the site intead of executing it. It was mozilla's cache fault. You saved my time bro. Show 1 more comment. If you're using PHP 7. AndrewFox- my filename is php7.

M Arfan M Arfan 3, 4 4 gold badges 24 24 silver badges 43 43 bronze badges. I tried this didn't work for me, I'm using ubuntu Add a comment.

So here are my 2 cents, nginx is a web server and not an application server and thus, it can only serve static pages. This is where common gateway interface CGI comes in. It's a piece of software that manages this communication.

Nice explainer. I had the same issue and none of the answers solved the problem. Nice touch to include the test-command syntax in addition to an advice to fix the issue. This workded for me.

Slimx Slimx 85 1 1 silver badge 4 4 bronze badges. For me it helped to add? Tomeg Tomeg 4, 2 2 gold badges 10 10 silver badges 9 9 bronze badges. Angel Avnee.

Improve this answer. Thank you! That worked. I was thinking of that file as a catch-all of general settings that should apply to all sites I'll host, then have specific site configs in the relevant files, no? To the best of my knowledge nginx allows 'global' settings for only some directives.

Best practices recommend dedicated server blocks. Even dynamically configured load balancers with service discovery generate full server blocks, based on an nginx template. See: nginx-proxy used with a template generator docker-gen using an nginx template nginx. If you scan the template you see dedicated server blocks and some 'global' settings — L.

Basically anything that is allowed in the http context. See map in the nginx docs as an example. Sign up or log in Sign up using Google.

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. Referenced it from a working server, then ran a quick search for additional info. Kamal, thank you for your answer. I keep downloading the index. Make sure you already installed it by typing php -v. If there is no version information about your PHP, then you should install it with:.

Where would you like to share this to? Twitter Reddit Hacker News Facebook. Share link Question share link. Sign Up. Yes, I'm sure. You previously marked this answer as accepted. Are you sure you want to unaccept it? DigitalOcean home. Community Control Panel. Hacktoberfest Contribute to Open Source.



0コメント

  • 1000 / 1000