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