Advertisement
METAJIJI

nginx proxy http

Aug 20th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.61 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.     server_name <DOMAIN0.LTD>;  # domain on ip.ip.ip.ip
  4.     server_name <DOMAIN1.LTD>;  # other domain on ip.ip.ip.ip
  5.     server_name <*.DOMAIN2.LTD>;  # wildcard domain proxy on ip.ip.ip.ip
  6.  
  7.     access_log /var/log/nginx/<DOMAIN.LTD>_http_access.log;
  8.     error_log /var/log/nginx/<DOMAIN.LTD>_http_error.log;
  9.  
  10.     location / {
  11.         proxy_pass http://<ip.ip.ip.ip>;  # Enter bachend server ip here
  12.     }
  13.  
  14.     # redirect server error pages to the static page /50x.html
  15.     error_page 500 502 503 504 /50x.html;
  16.     location = /50x.html {
  17.         root  /usr/share/nginx/html;
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement