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 {
42
42
default_type " text/plain" ;
43
43
try_files \$ uri =404;
44
44
}
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
+ }
47
49
}
48
50
" > " /etc/nginx/sites-enabled/${DOMAIN} .conf"
49
51
@@ -127,6 +129,7 @@ sudo mkdir -p "/var/www/${DOMAIN}/public/.well-known/acme-challenge"
127
129
# Add index page
128
130
echo " Html Works ..." > " /var/www/${DOMAIN} /public/index.html"
129
131
echo " <?php echo 'Php Works ...';" > " /var/www/${DOMAIN} /public/index.php"
132
+ echo " Webroot certs ..." > " /var/www/${DOMAIN} /public/.well-known/acme-challenge/index.html"
130
133
131
134
# Chmods
132
135
sudo chown -R www-data:www-data /etc/nginx/sites-enabled
You can’t perform that action at this time.
0 commit comments