server {
listen 80;
server_name amol.focalworks.in;
root /usr/share/nginx/html;
if ($scheme != "https") {
return 301 https://$host$request_uri/.well-known/acme-challenge/test;
}
# Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
location /.well-known/acme-challenge/{
allow all;
default_type plain/text;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
Settings for a TLS enabled server.
server {
listen 443 ssl http2 default_server;
root /usr/share/nginx/html;
server_name amol.focalworks.in;
ssl_certificate "/amol.focalworks.in.crt";
ssl_certificate_key "/amol.focalworks.in.key";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
# Load configuration files for the default server block.
location /{
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}