Ajouter 'nginx/sites-available/default-example'
This commit is contained in:
parent
98fcfdd154
commit
d4b25e8225
|
@ -0,0 +1,60 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name <DOMAIN>;
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
root /var/www/letsencrypt/<DOMAIN>;
|
||||
allow all;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name <DOMAIN>;
|
||||
index index.html index.php index.htm;
|
||||
root /var/www/<DOMAIN>;
|
||||
|
||||
access_log /var/log/nginx/<DOMAIN>.access.log;
|
||||
error_log /var/log/nginx/<DOMAIN>.error.log;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/certificates/<DOMAIN>.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/certificates/<DOMAIN>.key;
|
||||
|
||||
include /etc/nginx/conf.d/ssl.conf;
|
||||
include /etc/nginx/conf.d/headers.conf;
|
||||
include /etc/nginx/conf.d/hsts.conf;
|
||||
include /etc/nginx/conf.d/ocsp.conf;
|
||||
|
||||
location / {
|
||||
include /etc/nginx/conf.d/proxy.conf;
|
||||
|
||||
client_max_body_size 50M;
|
||||
proxy_pass http://127.0.0.1:9000;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
root /var/www/letsencrypt/<DOMAIN>;
|
||||
allow all;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue