Comments (1)
Solved
After I change my configuration as below, it works!
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
upstream chat-server {
server chatting-server-2:8084;
}
upstream auth-server {
server auth-server:8085;
}
server {
listen 80;
# 추후 server_name 변경예정
server_name localhost;
# 채팅서버 backend
location ^~ /chat/ {
proxy_pass http://chat-server;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; # 클라이언트 요청 ip전송
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 클라이언트 요청 ip전송
}
# 인증서버 backend TODO
location ^~ /auth/ {
# rewrite ^([^.]*[^/])$ $1/ permanent; # tailing slash with every url
proxy_pass http://auth-server;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;
}
Maybe the problem is location regex.
from spring-chatting-server.
Related Issues (17)
- Connector configuration is invalid and contains the following 1 error(s) Error while validating connector config: Connection to localhost:5434 refused HOT 5
- Golang Test with segmentation violation HOT 3
- nginx error dial tcp [::1]:8080: socket: too many open files HOT 1
- JsonParseException: Unexpected character ('}' (code 125)) HOT 2
- Call logout normally, Get CANNOT_FIND_USER error
- Multithreading in JPA
- Error occured cloning to base directory with Connection Timeout HOT 2
- docker composing with rebuild image + restart container + remove dangling image
- How can we grouping Kafka Consumers in one group and assign multiple topics
- Absence of io.confluent.connect.jdbc.JdbcSinkConnector HOT 1
- org.apache.kafka.connect.errors.ConnectException HOT 4
- [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block] HOT 1
- Postman cannot send HTTP request
- [ERROR] The given id must not be null! HOT 2
- Multiple Topics with Kafka connector HOT 1
- get status code 409 by request multiple rest api HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-chatting-server.