vi /etc/nginx/sites-available/atlas.conf
server { listen 80; listen [::]:80; server_name <alias>.<domaine-sinp>; location / { proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://127.0.0.1:8080/;# ATTENTION : bien mettre un slash final ! Sinon => erreur 404 } }
cd /etc/nginx/sites-enabled/ ; ln -s ../sites-available/atlas.conf atlas.conf
nginx -t && nginx -s reload
systemctl status geonature-atlas.service
systemctl start geonature-atlas.service
systemctl stop geonature-atlas.service
certbot --nginx -d <alias>.<domaine-sinp> -d atlas.<domaine-sinp>
certbot --nginx -d nature.silene.eu -d atlas.silene.eu
certbot --nginx \ -d atlas.biodiversite-auvergne-rhone-alpes.fr \ -d atlas.biodiversite-auvergne-rhone-alpes.com \ -d atlas.biodiversite-auvergne-rhone-alpes.eu \ -d atlas.biodiversite-auvergne-rhone-alpes.net \ -d atlas.biodiversite-auvergne-rhone-alpes.org \ -d atlas.biodiversite-aura.com \ -d atlas.biodiversite-aura.eu \ -d atlas.biodiversite-aura.fr \ -d atlas.biodiversite-aura.net \ -d atlas.biodiversite-aura.org \ -d atlas.observatoire-biodiversite-auvergne-rhone-alpes.com \ -d atlas.observatoire-biodiversite-auvergne-rhone-alpes.eu \ -d atlas.observatoire-biodiversite-auvergne-rhone-alpes.fr \ -d atlas.observatoire-biodiversite-auvergne-rhone-alpes.net \ -d atlas.observatoire-biodiversite-auvergne-rhone-alpes.org
server { listen 443 ssl http2; # managed by Certbot listen [::]:443 ssl http2; # managed by Certbot server_name <prefixe-non-atlas>.<domaine-sinp>; auth_basic "Zone restreinte"; auth_basic_user_file /etc/nginx/.htpasswd; location / { proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # WARNING: up timeout to 90s to avoid 502 Bad Gateway response # Set timeout like Gunicorn in GeoNature-Atlas atlas/configuration/settings.ini file proxy_read_timeout 90s; proxy_connect_timeout 30s; proxy_pass http://127.0.0.1:8080/;# ATTENTION : bien mettre un slash final ! Sinon => erreur 404 } ssl_certificate /etc/letsencrypt/live/<prefixe-non-atlas>.<domaine-sinp>/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/<prefixe-non-atlas>.<domaine-sinp>/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { listen 443 ssl; listen [::]:443 ssl; server_name atlas.<domaine-sinp>; ssl_certificate /etc/letsencrypt/live/<prefixe-non-atlas>.<domaine-sinp>/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/<prefixe-non-atlas>.<domaine-sinp>/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot return 302 https://<prefixe-non-atlas>.<domaine-sinp>$request_uri; } server { listen 80; listen [::]:80; server_name <prefixe-non-atlas>.<domaine-sinp> atlas.<domaine-sinp>; return 302 https://<prefixe-non-atlas>.<domaine-sinp>$request_uri; }
vi ~/www/atlas/atlas/configuration/config.py