diff --git a/web-manage/nginx/setup/new_nginx_vhost.sh b/web-manage/nginx/setup/new_nginx_vhost.sh index 0ed3400..b1022a9 100755 --- a/web-manage/nginx/setup/new_nginx_vhost.sh +++ b/web-manage/nginx/setup/new_nginx_vhost.sh @@ -98,5 +98,7 @@ fi # check the nginx config /usr/sbin/nginx -t 2>&1 && echo -e "\n nginx config looks good. restart nginx when ready.\n" +echo "If IPv6 needs to be enabled on the vhost, navigate to the vhost and uncomment the 'listen' line." + ## EOF diff --git a/web-manage/nginx/setup/nginx_setup.sh b/web-manage/nginx/setup/nginx_setup.sh index eeb04df..28ece36 100755 --- a/web-manage/nginx/setup/nginx_setup.sh +++ b/web-manage/nginx/setup/nginx_setup.sh @@ -756,7 +756,12 @@ echo "Creating vhost-template.conf..." cat << EOF > /etc/nginx/templates.d/vhosts.d/vhost-template.conf server { + #IPv4 listen IP_ADDRESS:80; + + #IPv6 - Uncomment line below to enable ipv6 support + #listen [::]:80; + server_name HOST_NAME.DOMAIN_NAME; #To enable HTTPS, uncomment this line. @@ -781,7 +786,13 @@ echo "Creating vhost-template-ssl.conf..." cat << EOF > /etc/nginx/templates.d/vhosts.d/vhost-template-ssl.conf server { + #IPv4 listen IP_ADDRESS:443 ssl; + + #IPv6 - Uncomment line below to enable IPv6 + #listen [::]:443 ssl; + + server_name HOST_NAME.DOMAIN_NAME; ssl on; @@ -843,7 +854,13 @@ cat << EOF > /etc/nginx/templates.d/vhosts.d/includes/vhost-template.conf include fastcgi_params; } - # location / { + location / { + + #enable for wordpress pretty URLs + #try_files $uri $uri/ /index.php?$args; + + + #enable for proxy to Atlassian or J2EE applications # proxy_read_timeout 300; # proxy_connect_timeout 300; # proxy_redirect off; @@ -853,7 +870,7 @@ cat << EOF > /etc/nginx/templates.d/vhosts.d/includes/vhost-template.conf # proxy_set_header X-Real-IP \$remote_addr; # proxy_pass http://j2ee.HOST_NAME.DOMAIN_NAME:8009; - # } + } EOF