Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.77 KB | None | 0 0
  1. upstream wildfly {
  2.     server 127.0.0.1:8080;
  3. }
  4.  
  5. server {
  6.     listen      80;
  7.     server_name mydomain.com;
  8.     root /var/www/client;
  9.     index index.html;
  10.     access_log  /var/log/nginx/wildfly.access.log;
  11.     error_log   /var/log/nginx/wildfly.error.log;
  12.  
  13.     proxy_buffers 16 64k;
  14.     proxy_buffer_size 128k;
  15.  
  16. location /api {
  17.         proxy_pass  http://wildfly;
  18.         proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
  19.         proxy_redirect off;
  20.  
  21.         proxy_set_header    Host            $host;
  22.         proxy_set_header    X-Real-IP       $remote_addr;
  23.         proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
  24.         proxy_set_header    X-Forwarded-Proto https;
  25.     }
  26.    
  27.    error_page 404 =404 /;
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement