title: Nginx setting wrong content type
body: <p>I have an online web server where I have deployed multiple applications and they all have to share the domain, so my nginx config is a bit messy. The last time I changed it, the PHP files didn't load getting the error ("access denied to file") so I had to do some changes, now the config for one of the applications is like this:</p>
  
  <pre><code>location ^~ /vuelos_baratos {      
     root /home/gonzalo;
     try_files $uri $uri/ /$uri/index.php /index.php$is_args$args $uri/index.php =404;
     #root /usr/share/nginx/html;
     fastcgi_split_path_info ^(.+\.php)(/.+)$;
     fastcgi_pass unix:/run/php/php7.0-fpm.sock;
     fastcgi_index index.php;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include /etc/nginx/fastcgi_params;
     include  /etc/nginx/mime.types;
     autoindex on;
  }
  </code></pre>
  
  <p>and the urls of this application are like this:</p>
  
  <p>mydomain.com/vuelos_baratos/index.php</p>
  
  <p>mydomain.com/vuelos_baratos/style.css</p>
  
  <p>...
  and so on.</p>
  
  <p>And the PHP files and everything is working fine, except that If I try to acces:</p>
  
  <p>mydomain.com/vuelos_baratos/image.png</p>
  
  <p>I get the binary data of the image, I discovered that that is because the headers for all files under "vuelos_baratos" are set to type: text/html</p>
  
  <p>How can I fix this?</p>