Improve docs for default site with HTTPS

Provide a working solution of default site configuration for both HTTP and HTTPS requests.
This commit is contained in:
Emanuele Bertoldi authored and GitHub committed 2018-04-13 01:56:01 +02:00
1 parent dc2bdbc366
commit 418ecf67c2
1 file changed
+13 -5
+13 -5
View File
@@ -131,12 +131,20 @@ Create the file at `/etc/nginx/conf.d/00-default-vhost.conf`:
```nginx ```nginx
server { server {
listen 80 default_server; listen 80 default_server;
listen [::]:80 default_server; server_name _;
access_log off;
return 410;
}
server_name _; # For HTTPS requests you can enable this section:
return 410; # (You need a SSL certificate in /etc/nginx/ssl/)
log_not_found off; server {
# listen 443 ssl;
# server_name _;
# ssl_certificate /etc/nginx/ssl/cert.crt;
# ssl_certificate_key /etc/nginx/ssl/cert.key;
# return 410;
} }
``` ```