93 lines
2.7 KiB
Nginx Configuration File
93 lines
2.7 KiB
Nginx Configuration File
worker_processes 1;
|
|
|
|
events { worker_connections 1024; }
|
|
|
|
http {
|
|
client_max_body_size 5M;
|
|
|
|
# Path del certificato Let's Encrypt unico multi-dominio (SAN).
|
|
# Il nome della cartella live/ corrisponde al primo -d passato a certbot
|
|
# in init-letsencrypt.sh (dominio primario / CN).
|
|
# ssl_certificate /etc/letsencrypt/live/www.ifattidinapoli.it/fullchain.pem;
|
|
# ssl_certificate_key /etc/letsencrypt/live/www.ifattidinapoli.it/privkey.pem;
|
|
|
|
server {
|
|
listen 80;
|
|
server_name ifattidinapoli.it;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://www.ifattidinapoli.it$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name ifattidinapoli.it;
|
|
ssl_certificate /etc/letsencrypt/live/www.ifattidinapoli.it/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/www.ifattidinapoli.it/privkey.pem;
|
|
return 301 https://www.ifattidinapoli.it$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name www.ifattidinapoli.it preproduction.ifattidinapoli.it;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name www.ifattidinapoli.it preproduction.ifattidinapoli.it default_server;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/www.ifattidinapoli.it/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/www.ifattidinapoli.it/privkey.pem;
|
|
|
|
location / {
|
|
proxy_pass http://fdn2.production.webserver/;
|
|
proxy_redirect off;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name test.ifattidinapoli.it;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name test.ifattidinapoli.it;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/www.ifattidinapoli.it/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/www.ifattidinapoli.it/privkey.pem;
|
|
|
|
location / {
|
|
proxy_pass http://fdn2.test.webserver/;
|
|
proxy_redirect off;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
}
|
|
|
|
}
|