Skip to content

Commit

Permalink
Merge pull request xeoncross#1 from perttierkkila/ipv6-fix
Browse files Browse the repository at this point in the history
nginx and ipv6-fix
  • Loading branch information
esemeniuc committed Mar 18, 2013
2 parents b6f5391 + 1958425 commit b38fa95
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions setup-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,6 @@ server {
access_log off;
}
## Made IPV6 Listener not conflict and throw errors
sed -i \
"s/listen [::]:80 default_server;/listen [::]:80 default_server ipv6only=on;/" \
/etc/nginx/sites-available/default
## Disable viewing .htaccess & .htpassword
location ~ /\.ht {
deny all;
Expand Down Expand Up @@ -406,6 +401,15 @@ END
echo 'Created /etc/nginx/php.conf for PHP sites'
echo 'Created /etc/nginx/sites-available/default_php sample vhost'
echo ' '

if [ -f /etc/nginx/sites-available/default ]
then
# Made IPV6 Listener not conflict and throw errors
sed -i \
"s/listen \[::]:80 default_server;/listen [::]:80 default_server ipv6only=on;/" \
/etc/nginx/sites-available/default
fi

if [ -f /etc/nginx/nginx.conf ]
then
sed -i \
Expand Down

0 comments on commit b38fa95

Please sign in to comment.