File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,10 @@ server {
4242 default_type " text/plain" ;
4343 try_files \$ uri =404;
4444 }
45- # Redirect ssl
46- return 301 https://${TO_HOST} \$ request_uri;
45+ location / {
46+ # Redirect ssl
47+ return 301 https://${TO_HOST} \$ request_uri;
48+ }
4749}
4850" > " /etc/nginx/sites-enabled/${DOMAIN} .conf"
4951
@@ -127,6 +129,7 @@ sudo mkdir -p "/var/www/${DOMAIN}/public/.well-known/acme-challenge"
127129# Add index page
128130echo " Html Works ..." > " /var/www/${DOMAIN} /public/index.html"
129131echo " <?php echo 'Php Works ...';" > " /var/www/${DOMAIN} /public/index.php"
132+ echo " Webroot certs ..." > " /var/www/${DOMAIN} /public/.well-known/acme-challenge/index.html"
130133
131134# Chmods
132135sudo chown -R www-data:www-data /etc/nginx/sites-enabled
You can’t perform that action at this time.
0 commit comments