nginx-reverse-proxy

Nginx error “1024 worker_connections are not enough”

纵然是瞬间 提交于 2020-08-26 09:01:50
问题 My website is running in a Docker Image using Nginx with reverse proxy. Site is working prefectly for many hours under heavy traffic, but eventually it stops working and giving no response with 5** time out error. In AWS Elastic Beanstalks Nginx-log I found this error-message: [alert] 18037#0: 1024 worker_connections are not enough I am afraid something is wrong with my custom Nginx-config, but I do not understand what it is. Code from https-redirect-docker-sc.config is attached. I have tried

NGINX not routing calls from react app to backend app

☆樱花仙子☆ 提交于 2020-08-26 07:34:48
问题 I have an AWS Ubuntu server that hosts a react front end running at 127.0.0.1:4100 and makes api calls to a Go app using port 127.0.0.1:1323. I installed Nginx and setup proxy pass for these two ports in /etc/nginx/sites-available/default config file but I only get the front end getting called by Nginx. Using chrome inspect to check why the Go app is not serving some of the functionalities from the react app, I see this error client.js:772 GET http://127.0.0.1:1323/api/ net::ERR_CONNECTION

nginx reverse proxy - how to serve multiple apps

佐手、 提交于 2020-07-22 04:40:09
问题 I am trying to build a reverse proxy with nginx to make all Is in my project reachable from single address. For a single service the configuration below works without problem /etc/nginx/sites-enabled/reverse-proxy.conf server { listen 80; listen [::]:80; location / { resolver 127.0.0.1; allow "x.x.x.x"; deny all; proxy_pass http://consul:8500; } } So when I call server's ip x.x.x.x in my browser I see the Consul UI and the URL showing x.x.x.x/ui/dc1 . Besides that, I see that the UI did

Nginx Reverse Proxy WebSocket Timeout

最后都变了- 提交于 2020-07-07 14:32:23
问题 I'm using java-websocket for my websocket needs, inside a wowza application, and using nginx for ssl, proxying the requests to java. The problem is that the connection seems to be cut after exactly 1 hour, server-side. The client-side doesn't even know that it was disconnected for quite some time. I don't want to just adjust the timeout on nginx, I want to understand why the connection is being terminated, as the socket is functioning as usual until it isn't. EDIT: Forgot to post the

replace part of request_uri before passing it to proxy_pass

怎甘沉沦 提交于 2020-06-28 09:55:09
问题 i'm trying to replace specific part or request_uri using rewrite, but it won't work for some reason example url: http://example.com:3000/?soft=55191&src1=changethis&src2=HOME&type=0&id=7700458 server { server_name example.com; listen 3000; location / { resolver 8.8.8.8; rewrite ^(?<=&src1=)(.*)(?=&src2)$ changewiththis$1 break; proxy_pass http://example2.com; } } so the Goal here is to replace the exact string between 'src1=' and '&src2' so it can be passed to proxy_pass with the changed

replace part of request_uri before passing it to proxy_pass

蓝咒 提交于 2020-06-28 09:52:08
问题 i'm trying to replace specific part or request_uri using rewrite, but it won't work for some reason example url: http://example.com:3000/?soft=55191&src1=changethis&src2=HOME&type=0&id=7700458 server { server_name example.com; listen 3000; location / { resolver 8.8.8.8; rewrite ^(?<=&src1=)(.*)(?=&src2)$ changewiththis$1 break; proxy_pass http://example2.com; } } so the Goal here is to replace the exact string between 'src1=' and '&src2' so it can be passed to proxy_pass with the changed

Compose URL address on the location with the server IP address using upstream on Nginx configuration

巧了我就是萌 提交于 2020-04-18 00:50:08
问题 I have this situation where a have lots of API´s running on different machines on different ports using Tomcat. I can create the upstream with those IP addresses but how to add the other part of the URL to the upstream when setting the proxy_pass? The upstream: upstream login_api_stream { least_conn; server 10.2.54.8:8185; server 10.2.54.8:8285; server 10.2.54.8:8385; server 10.2.54.9:8085 backup; } Then I create the location inside http: location /login-api/ { add_header X-Real-IP $remote

nginx does not automatically pick up dns changes in swarm

…衆ロ難τιáo~ 提交于 2020-04-13 03:49:29
问题 I'm running nginx via lets-nginx in the default nginx configuration (as per the lets-nginx project) in a docker swarm: services: ssl: image: smashwilson/lets-nginx networks: - backend environment: - EMAIL=sas@finestructure.co - DOMAIN=api.finestructure.co - UPSTREAM=api:5000 ports: - "80:80" - "443:443" volumes: - letsencrypt:/etc/letsencrypt - dhparam_cache:/cache api: image: registry.gitlab.com/project_name/image_name:0.1 networks: - backend environment: - APP_SETTINGS=/api.cfg configs: -