# Configure NGINX.
cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube
sed -i "s/peertube.example.com/${domain}/g" /etc/nginx/sites-available/peertube
-sed -iE 's/^([[:space:]]*)(access_log|error_log)([[:space:]])/\1# \2\3/' /etc/nginx/sites-available/peertube
+sed -i -E 's/^([[:space:]]*)(access_log|error_log)([[:space:]])/\1# \2\3/g' /etc/nginx/sites-available/peertube
ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube
# Configure systemd and start PeerTube through it.