prive:linux:app-service:nginx:nginx-usage

Nginx-Usage

/nginx/conf.d:/etc/nginx/conf.d
/nginx/ssl:/etc/nginx/ssl
/nginx/passwds:/etc/nginx/passwds
/nginx/www:/etc/nginx/www
/nginx/log:/var/log/nginx
default.conf
headers.config
proxy.config
ssl.config

Exemple d'un vhost app.conf

server {
  listen 8443 ssl http2;
  server_name app1.domain.tld;

  ssl_certificate /etc/nginx/ssl/live/domain.tld/cert.pem;
  ssl_certificate_key /etc/nginx/ssl/live/domain.tld/privkey.pem;
  ssl_trusted_certificate /etc/nginx/ssl/live/domain.tld/chain.pem;

  include /etc/nginx/conf.d/ssl.config;
  include /etc/nginx/conf.d/headers.config;

  ## authentication ##
  auth_basic "app1.domain.tld";
  auth_basic_user_file "/etc/nginx/passwds/app1_passwd";

  location / {
    proxy_pass http://app1:8080;
    include /etc/nginx/conf.d/proxy.config;
  }

  access_log /var/log/nginx/app1-access.log combined;
  error_log /var/log/nginx/app1-error.log error;
}

vhost sur le port 80 : default.conf (je l'utilise pour faire les challenges let's encrypt)

server {
  listen 8080;
  charset utf-8;
  server_name *.domain.tld;

  root /etc/nginx/www/acme;

  location /.well-known/acme-challenge {}
}

Ajouter lien

sudo ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default 

Suppr ln site lien :

sudo unlink /etc/nginx/sites-enabled/default

Lien: https://mondedie.fr/d/10961-traefik-vs-nginx-proxy-manager-round-1-fight/16
https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/#auto-renewal
https://openclassrooms.com/fr/courses/1733551-gerez-votre-serveur-linux-et-ses-services/5236081-mettez-en-place-un-reverse-proxy-avec-nginx
https://nginxproxymanager.com/
https://www.julienmousqueton.fr/fail2ban-pour-nginx/
https://www.julienmousqueton.fr/generez-vos-fichiers-de-configuration-nginx/
https://www.digitalocean.com/community/tools/nginx
https://azimut7.com/blog/nginx-redirect-map
https://nginx.org/en/docs/varindex.html
https://www.sheevaboite.fr/articles/erreurs-403-forbidden-nginx/
https://wiki.meurisse.org/wiki/Nginx
https://www.it-connect.fr/nginx-comment-configurer-lauthentification-http-basique/
https://grafana.com/grafana/dashboards/12559?pg=dashboards&plcmt=featured-main
https://www.digitalocean.com/community/tools/nginx?domains.0.server.domain=srvserveur.com&domains.0.server.path=%2Fvar%2Fwww%2Fsrvserveur.com&domains.0.server.redirectSubdomains=false&domains.0.server.listenIpv4=192.168.10.100&domains.0.https.hsts=false&domains.0.https.letsEncryptEmail=contact%40srvserveur.com&domains.0.php.php=false&domains.0.reverseProxy.reverseProxy=true&domains.0.routing.fallbackHtml=true&domains.0.routing.legacyPhpRouting=true&domains.0.logging.accessLog=true&domains.0.logging.errorLog=true&global.https.portReuse=true&global.https.ocspCloudflare=false&global.https.ocspGoogle=false&global.https.ocspOpenDns=false&global.https.ocspQuad9=true&global.logging.logNotFound=true&global.logging.cloudflare=true&global.logging.xForwardedFor=true&global.logging.xForwardedProto=true&global.logging.trueClientIp=true&global.logging.cfIpCountry=true&global.logging.cfVisitor=true&global.logging.cdnLoop=true&global.app.lang=fr
https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/

  • prive/linux/app-service/nginx/nginx-usage.txt
  • Dernière modification : 2024/09/11 13:37
  • de 127.0.0.1