Nginx proxy for webserver which is on different server where apache is dockerized -


i on scenario :

server (endpoint on dmz) running somes django apps through nginx (on same server), have no trouble on those.

server b (another local ip) running 2 docker's containers. 1 of them run apache, other run postgis.

i have configure nginx (server a) 2 django apps , pelican blog, different subdomain. no trouble them.

apache in server b run webapp on port 80. when page server:port on local network it's work properly.

it may important know redirection done apache , it's done on browser.

what need access server's b webapp nginx located on subdomain.

i thought add new conf on ngnix on a's server made trick :

server {  listen [::]:80; listen 80;  server_name sub.dns.com;  access_log /var/log/nginx/proxy-access.log; error_log /var/log/nginx/proxy-error.log;  location = / {     # instead of handling index,     # rewrite / /index.html     proxy_pass http://192.168.1.xx;  } } 

but when try page, 404 not found. but, can see redirection in client browser .

this error in nginx log :

2016/11/30 13:30:39 [error] 23662#0: *6204 "/usr/share/nginx/html/websig/lizmap/index.html" not found (2: no such file or directory), client: ipxxx , server: [sub.dns.com] , request: "get /websig/lizmap/ http/1.1", host: "[sub.dns.com]" 

i cannot figure out what's happening. have not experiences on nginx , multiserver configuration. please tell me if question not clever enought , if need more info.

i find reason of trouble. nginx block location on server declare =/ had remove = proxying uri on server b , it's workins charm


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -