nginx vhost ipv6 compatibility
IPv6 Compatibility (Nginx Default Site is IPv6 compatible, resulting in not-working vhosts when AAAA DNS entry is set)
This commit is contained in:
1 parent
432aec67d5
commit
95c9656fc8
1 file changed
+3
@@ -24,12 +24,14 @@ if [[ -f "$DOKKU_ROOT/VHOST" ]]; then
|
|||||||
cat<<EOF > $DOKKU_ROOT/$APP/nginx.conf
|
cat<<EOF > $DOKKU_ROOT/$APP/nginx.conf
|
||||||
upstream $APP { server 127.0.0.1:$PORT; }
|
upstream $APP { server 127.0.0.1:$PORT; }
|
||||||
server {
|
server {
|
||||||
|
listen [::]:80;
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name $hostname;
|
server_name $hostname;
|
||||||
return 301 https://\$host\$request_uri;
|
return 301 https://\$host\$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
listen [::]:443;
|
||||||
listen 443;
|
listen 443;
|
||||||
server_name $hostname;
|
server_name $hostname;
|
||||||
|
|
||||||
@@ -60,6 +62,7 @@ else
|
|||||||
cat<<EOF > $DOKKU_ROOT/$APP/nginx.conf
|
cat<<EOF > $DOKKU_ROOT/$APP/nginx.conf
|
||||||
upstream $APP { server 127.0.0.1:$PORT; }
|
upstream $APP { server 127.0.0.1:$PORT; }
|
||||||
server {
|
server {
|
||||||
|
listen [::]:80;
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name $hostname;
|
server_name $hostname;
|
||||||
location / {
|
location / {
|
||||||
|
|||||||
Reference in new issue
Block a user