Advertisement
Sergio_Istea

ssh.nginx.vhost

Nov 22nd, 2023
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. upstream backend.servers {
  2.  
  3. least_conn;
  4. server 192.168.0.181:9000;
  5. server 192.168.0.182:9000;
  6.  
  7. }
  8.  
  9.  
  10. server {
  11. listen 80;
  12. server_name site.laboratorio;
  13.  
  14. # redireccion
  15. return 301 https://$host$request_uri;
  16.  
  17. }
  18.  
  19.  
  20. server {
  21. listen 443 ssl;
  22. server_name site.laboratorio;
  23.  
  24. location / {
  25. proxy_pass http://backend.servers;
  26. proxy_set_header Host $host;
  27. proxy_set_header X-Real-IP $remote_addr;
  28. }
  29.  
  30. ssl on;
  31. ssl_certificate /etc/nginx/ssl_keys/site.laboratorio.crt;
  32. ssl_certificate_key /etc/nginx/ssl_keys/site.laboratorio.key;
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement