vi /etc/nginx/sites-available/taxhub.conf
server { listen 80; listen [::]:80; server_name taxhub.<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:5000/;# ATTENTION : bien mettre un slash final ! Sinon => erreur 404 } }
cd /etc/nginx/sites-enabled/ ; ln -s ../sites-available/taxhub.conf taxhub.conf
nginx -t && nginx -s reload
supervisorctl status
supervisorctl start taxhub
supervisorctl stop taxhub
certbot --nginx -d taxhub.<domaine-sinp>
certbot --nginx -d taxhub.silene.eu
certbot --nginx \ -d taxons.biodiversite-aura.fr -d taxhub.biodiversite-aura.fr \ -d taxons.biodiversite-aura.com -d taxhub.biodiversite-aura.com \ -d taxons.biodiversite-aura.eu -d taxhub.biodiversite-aura.eu \ -d taxons.biodiversite-aura.net -d taxhub.biodiversite-aura.net \ -d taxons.biodiversite-aura.org -d taxhub.biodiversite-aura.org \ -d taxons.biodiversite-auvergne-rhone-alpes.com -d taxhub.biodiversite-auvergne-rhone-alpes.com \ -d taxons.biodiversite-auvergne-rhone-alpes.eu -d taxhub.biodiversite-auvergne-rhone-alpes.eu \ -d taxons.biodiversite-auvergne-rhone-alpes.net -d taxhub.biodiversite-auvergne-rhone-alpes.net \ -d taxons.biodiversite-auvergne-rhone-alpes.org -d taxhub.biodiversite-auvergne-rhone-alpes.org \ -d taxons.observatoire-biodiversite-auvergne-rhone-alpes.com -d taxhub.observatoire-biodiversite-auvergne-rhone-alpes.com \ -d taxons.observatoire-biodiversite-auvergne-rhone-alpes.eu -d taxhub.observatoire-biodiversite-auvergne-rhone-alpes.eu \ -d taxons.observatoire-biodiversite-auvergne-rhone-alpes.fr -d taxhub.observatoire-biodiversite-auvergne-rhone-alpes.fr \ -d taxons.observatoire-biodiversite-auvergne-rhone-alpes.net -d taxhub.observatoire-biodiversite-auvergne-rhone-alpes.net \ -d taxons.observatoire-biodiversite-auvergne-rhone-alpes.org -d taxhub.observatoire-biodiversite-auvergne-rhone-alpes.org
server { listen 443 ssl http2; # managed by Certbot listen [::]:443 ssl http2; # managed by Certbot server_name taxhub.<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:5000/;# ATTENTION : bien mettre un slash final ! Sinon => erreur 404 } ssl_certificate /etc/letsencrypt/live/taxhub.<domaine-sinp>/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/taxhub.<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 80; listen [::]:80; server_name taxhub.<domaine-sinp>; return 302 https://$host$request_uri; }