File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 2
2
listen 80;
3
3
listen 8000;
4
4
5
- server_name docker;
5
+ server_name <ALIAS_DOMAIN> docker;
6
6
access_log /dev/stdout;
7
7
error_log /dev/stdout info;
8
8
Original file line number Diff line number Diff line change 7
7
# Detect correct path of document root
8
8
DOCUMENT_ROOT=$( readlink -f " /docker/$DOCUMENT_ROOT " )
9
9
10
+ ALIAS_DOMAIN=" "
11
+ for DOMAIN in $DNS_DOMAIN ; do
12
+ ALIAS_DOMAIN=" ${ALIAS_DOMAIN} *.${DOMAIN} "
13
+ done
14
+
10
15
rm -f -- /etc/nginx/conf.d/* .conf
11
16
cp /opt/docker/vhost.conf /etc/nginx/conf.d/vhost.conf
12
17
/bin/sed -i " s@<DOCUMENT_ROOT>@${DOCUMENT_ROOT} @" /etc/nginx/conf.d/vhost.conf
@@ -16,6 +21,7 @@ cp /opt/docker/vhost.conf /etc/nginx/conf.d/vhost.conf
16
21
/bin/sed -i " s@<FLOW_REWRITEURLS>@${FLOW_REWRITEURLS} @" /etc/nginx/conf.d/vhost.conf
17
22
/bin/sed -i " s@<FPM_HOST>@${MAIN_PORT_9000_TCP_ADDR} @" /etc/nginx/conf.d/vhost.conf
18
23
/bin/sed -i " s@<FPM_PORT>@${MAIN_PORT_9000_TCP_PORT} @" /etc/nginx/conf.d/vhost.conf
24
+ /bin/sed -i " s@<ALIAS_DOMAIN>@${ALIAS_DOMAIN} @" /etc/nginx/conf.d/vhost.conf
19
25
20
26
# ############################
21
27
# # COMMAND
You can’t perform that action at this time.
0 commit comments