File: //home/utah.mytiny.us
server {
server_name utah.mytiny.us;
location /.well-known/acme-challenge/ {
root /var/www/html;
}
#location / {
# return 301 https://$host$request_uri;
#}
root /var/www/html/utah;
index index.php index.html;
access_log /var/log/nginx/utah-access.log;
error_log /var/log/nginx/utah-error.log;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/utah.mytiny.us/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/utah.mytiny.us/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 = utah.mytiny.us) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name utah.mytiny.us;
return 404; # managed by Certbot
}