I have moved from apache to NGINX+PHP-FPM, now there some problem with
.json file, In apache whenver I access .json file the output shows on
browser page. But in NGINX its try to download.
You have to add .json to your mime.types file (the default for unknown
file extensions is default_type application/octet-stream;
which usually all browsers download).
Egg open conf/mime.types find the line:
text/plain txt;
add json there:
text/plain txt json;
… and reload or restart nginx (clear browser cache to be sure).
I have moved from apache to NGINX+PHP-FPM, now there some problem with
.json file, In apache whenver I access .json file the output shows on
browser page. But in NGINX its try to download.
here’s how my config looks like. Please note the 2 Pyramid apps at the
bottom, from which I am trying to server the json file.
Anything obviously wrong with that setup that could be affecting the
header?
thanks
========================
user www www;
worker_processes 1;
events {
# After increasing this value You probably should increase limit
# of file descriptors (for example in start_precmd in startup
script)
worker_connections 1024;
}
http {
include /opt/local/etc/nginx/mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local]