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:
committed by
GitHub
parent
dc2bdbc366
commit
418ecf67c2
@@ -131,12 +131,20 @@ Create the file at `/etc/nginx/conf.d/00-default-vhost.conf`:
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
access_log off;
|
||||
return 410;
|
||||
}
|
||||
|
||||
server_name _;
|
||||
return 410;
|
||||
log_not_found off;
|
||||
# For HTTPS requests you can enable this section:
|
||||
# (You need a SSL certificate in /etc/nginx/ssl/)
|
||||
server {
|
||||
# listen 443 ssl;
|
||||
# server_name _;
|
||||
# ssl_certificate /etc/nginx/ssl/cert.crt;
|
||||
# ssl_certificate_key /etc/nginx/ssl/cert.key;
|
||||
# return 410;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user