Modifying vhosts Nginx

This commit is contained in:
Miguel Martinez
2015-05-21 17:04:11 -07:00
parent 94a3c8363f
commit d0046d1fc3
2 changed files with 19 additions and 1 deletions
+4 -1
View File
@@ -9,7 +9,10 @@ RUN apt-get update -q && DEBIAN_FRONTEND=noninteractive apt-get install -qy wget
rm /opt/bitnami/ctlscript.sh /opt/bitnami/use_nginxstandalonestack && \
DEBIAN_FRONTEND=noninteractive apt-get --purge autoremove -qy wget && apt-get clean && rm -rf /var/lib/apt && rm -rf /var/cache/apt/archives/*
RUN mv /opt/bitnami/nginx/conf /opt/bitnami/nginx/conf.defaults && \
ADD vhosts/* /opt/bitnami/nginx/conf/vhosts/
RUN echo "include "/opt/bitnami/nginx/conf/vhosts/*.conf";" > /opt/bitnami/nginx/conf/bitnami/bitnami-apps-vhosts.conf && \
mv /opt/bitnami/nginx/conf /opt/bitnami/nginx/conf.defaults && \
mv /opt/bitnami/nginx/html /opt/bitnami/nginx/html.defaults && \
ln -s /opt/bitnami/nginx/conf/ /conf && \
ln -s /opt/bitnami/nginx/logs/ /logs && \
@@ -0,0 +1,15 @@
server {
listen 0.0.0.0:80;
server_name yourapp.com;
access_log /logs/yourapp_access.log;
error_log /logs/yourapp_error.log;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://[your_node_container_link_alias];
proxy_redirect off;
}
}