Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加nginx代理不能添加工程名 #26

Closed
litongjava opened this issue Sep 10, 2019 · 0 comments
Closed

添加nginx代理不能添加工程名 #26

litongjava opened this issue Sep 10, 2019 · 0 comments

Comments

@litongjava
Copy link

nginx配置如下

server {
  listen       80;
  server_name  localhost;
  location /rttys/ {
    proxy_pass http://127.0.0.1:5912/;
    proxy_http_version 1.1;
    proxy_read_timeout 300;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host:$server_port;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Real-PORT $remote_port;
  }
}

通过上面的配置自以为可以给我rttys添加一个工程名rttys,但是失败
使用curl测试
返回的location是/?t=1568125811,不包含工程名

curl -v "http://192.168.99.214/rttys/"
* About to connect() to 192.168.99.214 port 80 (#0)
*   Trying 192.168.99.214...
* Connected to 192.168.99.214 (192.168.99.214) port 80 (#0)
> GET /rttys/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 192.168.99.214
> Accept: */*
> 
< HTTP/1.1 302 Found
< Server: nginx
< Date: Tue, 10 Sep 2019 14:30:11 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 37
< Connection: keep-alive
< Location: /?t=1568125811
< 
<a href="/?t=1568125811">Found</a>.

* Connection #0 to host 192.168.99.214 left intact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants