The appropriate server block for johnrose.mywire.org is:
# Virtual Host configuration for johnrose.mywire.org
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
server {
server_name johnrose.mywire.org;
root /home/manager/www/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/johnrose.mywire.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/johnrose.mywire.org/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = johnrose.mywire.org) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name johnrose.mywire.org;
return 404; # managed by Certbot
}
My feeling is that I should change the above root to /home/manager/www and add an alias or location both for the html sub-directory and for the images sub-directory (of the root directory). Is that correct?
# Virtual Host configuration for johnrose.mywire.org
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
server {
server_name johnrose.mywire.org;
root /home/manager/www/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/johnrose.mywire.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/johnrose.mywire.org/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = johnrose.mywire.org) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name johnrose.mywire.org;
return 404; # managed by Certbot
}
My feeling is that I should change the above root to /home/manager/www and add an alias or location both for the html sub-directory and for the images sub-directory (of the root directory). Is that correct?