Skip to content
Snippets Groups Projects
Commit 58699365 authored by Bob Mottram's avatar Bob Mottram
Browse files

Remove default website if it exists

parent b37796c6
No related branches found
No related tags found
No related merge requests found
......@@ -780,9 +780,12 @@ function image_install_web_server {
echo ' include /etc/nginx/sites-enabled/*;';
echo '}'; } > "$rootdir/etc/nginx/nginx.conf"
chroot "$rootdir" iptables -A INPUT -p tcp --dport 80 -j ACCEPT
chroot "$rootdir" iptables -A INPUT -p tcp --dport 443 -j ACCEPT
chroot "$rootdir" iptables-save > /etc/firewall.conf
if [ -f "$rootdir/etc/nginx/sites-enabled/default" ]; then
rm "$rootdir/etc/nginx/sites-enabled/default"
fi
if [ -f "$rootdir/etc/nginx/sites-available/default" ]; then
rm "$rootdir/etc/nginx/sites-available/default"
fi
}
function install_web_server {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment