nginx
nginx copied to clipboard
Unable to set NGINX_SERVER_EXTRA_CONF_FILEPATH
Actually I'm not able to load any custom setup for nginx. Whatever path I set with NGINX_SERVER_EXTRA_CONF_FILEPATH custom conf file is not found.
Or if someone can point me, need to set some custom location { ... } with proxy_pass thanks
location ~* ^.+.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { access_log off; log_not_found off; expires max;
add_header Access-Control-Allow-Origin *;
try_files $uri @production;
}
location @production { resolver 1.1.1.1; #proxy_ssl_session_reuse on; #proxy_ssl_verify off; #proxy_ssl_verify_depth 2; #proxy_ssl on; #proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #proxy_ssl_server_name on; proxy_pass https://someurl.com/$uri; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }
Hi, what value you set for NGINX_SERVER_EXTRA_CONF_FILEPATH
?
You have to set this NGINX_SERVER_EXTRA_CONF_FILEPATH to some location existing inside the container. This means, you may have to mount it to the container as well. Eg : If you set
NGINX_SERVER_EXTRA_CONF_FILEPATH : /etc/nginx/extra.conf
Then you have to mount like this
docker-compose /extra-nginx.conf:/etc/nginx/extra.conf in docker-compose ,
docker run $(pwd):/extra-nginx.conf:/etc/nginx/extra.conf in docker run.