Advertisement
Guest User

Untitled

a guest
Aug 13th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. # Default website
  2. server {
  3.  
  4. listen 80 default_server;
  5. server_name _;
  6. server_name_in_redirect off;
  7.  
  8. proxy_set_header X-Real-IP $remote_addr;
  9. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  10. proxy_set_header Host $host:80;
  11.  
  12. set $proxyserver "http://127.0.0.1:8888";
  13. set $docroot "/home/bitrix/www";
  14.  
  15. index index.php;
  16. root /home/bitrix/www;
  17.  
  18. # Redirect to ssl if need
  19. if (-f /home/bitrix/www/.htsecure) { rewrite ^(.*)$ https://$host$1 permanent; }
  20.  
  21. # Include parameters common to all websites
  22. include bx/conf/bitrix.conf;
  23.  
  24. # Include server monitoring locations
  25. include bx/server_monitor.conf;
  26.  
  27. # Proxy for webmin
  28. # Last slash is important
  29. location /webadmin/ {
  30. # Tell nginx that we want to proxy everything here to the local webmin server
  31. # Last slash is important
  32. proxy_pass http://127.0.0.1:10000/;
  33. # Change the response Location: header to come from our proxy directory, not the server
  34. # Fixes initial redirect after login
  35. proxy_redirect http://$host:10000/ /webadmin/;
  36. # Also fixes initial redirect after login
  37. proxy_set_header Host $host;
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement