Advertisement
Guest User

nginx wp

a guest
Aug 15th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. server {
  2. listen 8080;
  3. server_name xxxxx.com xxxx.com;
  4.  
  5. #charset koi8-r;
  6.  
  7. access_log logs/xxxx.access.log ;
  8.  
  9. proxy_set_header Host $host;
  10. proxy_set_header X-Real-IP $remote_addr;
  11. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  12.  
  13. # Let the Set-Cookie header through.
  14. proxy_pass_header Set-Cookie;
  15.  
  16.  
  17. location / {
  18. proxy_pass http://backend;
  19. #index index.php index.html index.htm;
  20.  
  21. sub_filter_once off;
  22. # sub_filter_types text/html;
  23. sub_filter "http://192.168.xxx.113" "http://xxxx.com:8080";
  24.  
  25. proxy_http_version 1.1;
  26. proxy_set_header Connection "";
  27. }
  28.  
  29. #error_page 404 /404.html;
  30.  
  31. # redirect server error pages to the static page /50x.html
  32. #
  33. error_page 500 502 503 504 /50x.html;
  34. location = /50x.html {
  35. root html;
  36. }
  37.  
  38.  
  39.  
  40. }
  41.  
  42. upstream backend {
  43. # Defines backends.
  44. # Extracting here makes it easier to load balance
  45. # in the future. Needs to be specific IP as Plesk
  46. # doesn't have Apache listening on localhost.
  47. ip_hash;
  48. server 192.168.137.xxx:80; # IP goes here.
  49.  
  50.  
  51. keepalive 32;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement