Kukowski21042

Nginx downloads a file instead of showing html

Nginx downloads a file instead of going to index once you go to a folder server { listen 80; listen [::]:80; root /var/www/domain.com/html; index  2 Jul 2013 Make sure that mime.types has the extension "html" with the text/html file. how to force nginx to serve an html for download instead of display,  19 Nov 2016 Are there any other server blocks in Nginx configuration, especially with listen 80 default or default_server directives? Also try to add  11 May 2016 /index results in a file download with Nginx #350 creates for the front page are not passed to php-fpm and get downloaded instead. privkey; server_name www.domain.com; root /usr/share/nginx/html; location ~ \.php$  To obtain the path of a requested file, NGINX appends the request URI to the path specified by the Here, if the URI in a request is /path/ , and /data/path/index.html does not exist but To display the current listen queue, run this command:. Solution to PHP script at home page is downloaded instead of executed In this article will show two solutions. The second solution, edit your Nginx configuration file and add the script that handles the index.php file. Allowed HTML tags: