added support for ipv6 as it's a thing
This commit is contained in:
parent
9f85ca8f78
commit
c5de9423cc
@ -98,5 +98,7 @@ fi
|
|||||||
# check the nginx config
|
# check the nginx config
|
||||||
/usr/sbin/nginx -t 2>&1 && echo -e "\n nginx config looks good. restart nginx when ready.\n"
|
/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
|
## EOF
|
||||||
|
@ -756,7 +756,12 @@ echo "Creating vhost-template.conf..."
|
|||||||
|
|
||||||
cat << EOF > /etc/nginx/templates.d/vhosts.d/vhost-template.conf
|
cat << EOF > /etc/nginx/templates.d/vhosts.d/vhost-template.conf
|
||||||
server {
|
server {
|
||||||
|
#IPv4
|
||||||
listen IP_ADDRESS:80;
|
listen IP_ADDRESS:80;
|
||||||
|
|
||||||
|
#IPv6 - Uncomment line below to enable ipv6 support
|
||||||
|
#listen [::]:80;
|
||||||
|
|
||||||
server_name HOST_NAME.DOMAIN_NAME;
|
server_name HOST_NAME.DOMAIN_NAME;
|
||||||
|
|
||||||
#To enable HTTPS, uncomment this line.
|
#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
|
cat << EOF > /etc/nginx/templates.d/vhosts.d/vhost-template-ssl.conf
|
||||||
server {
|
server {
|
||||||
|
#IPv4
|
||||||
listen IP_ADDRESS:443 ssl;
|
listen IP_ADDRESS:443 ssl;
|
||||||
|
|
||||||
|
#IPv6 - Uncomment line below to enable IPv6
|
||||||
|
#listen [::]:443 ssl;
|
||||||
|
|
||||||
|
|
||||||
server_name HOST_NAME.DOMAIN_NAME;
|
server_name HOST_NAME.DOMAIN_NAME;
|
||||||
|
|
||||||
ssl on;
|
ssl on;
|
||||||
@ -843,7 +854,13 @@ cat << EOF > /etc/nginx/templates.d/vhosts.d/includes/vhost-template.conf
|
|||||||
include fastcgi_params;
|
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_read_timeout 300;
|
||||||
# proxy_connect_timeout 300;
|
# proxy_connect_timeout 300;
|
||||||
# proxy_redirect off;
|
# 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_set_header X-Real-IP \$remote_addr;
|
||||||
|
|
||||||
# proxy_pass http://j2ee.HOST_NAME.DOMAIN_NAME:8009;
|
# proxy_pass http://j2ee.HOST_NAME.DOMAIN_NAME:8009;
|
||||||
# }
|
}
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user