You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default the /etc/nginx/conf.d/nginx.conf is created for you.... and it looks something like this:
server {
listen 80;
location / {
try_files $uri @app;
}
location @app {
include uwsgi_params;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
}
This is done by the script "entrypoint.sh" ... which has a bunch of "content_server= ... " ending with a print "$content_server" > /etc/nginx/conf.d/nginx
I need to be able to add some more locations to the server definition block... specifically a location that returns a 404 for files that end in json... which needs to look like this:
location ~ (.json$) {return 404;}
I can only think of ugly ways to do this...
I suppose I can modify the entrypoint script... and add do a pull request
I can make a nginx.conf that combines /etc/nginx/nginx.conf and the generated code + my addition
Dont really like either one of my ideas. What is the proper way?
Thanks,
Alan
The text was updated successfully, but these errors were encountered:
By default the /etc/nginx/conf.d/nginx.conf is created for you.... and it looks something like this:
server {
listen 80;
location / {
try_files $uri @app;
}
location @app {
include uwsgi_params;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
}
This is done by the script "entrypoint.sh" ... which has a bunch of "content_server= ... " ending with a print "$content_server" > /etc/nginx/conf.d/nginx
I need to be able to add some more locations to the server definition block... specifically a location that returns a 404 for files that end in json... which needs to look like this:
location ~ (.json$) {return 404;}
I can only think of ugly ways to do this...
Dont really like either one of my ideas. What is the proper way?
Thanks,
Alan
The text was updated successfully, but these errors were encountered: