mirror of
https://github.com/bitnami/containers.git
synced 2026-10-21 10:10:23 +02:00
Modifying vhosts Nginx
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user