1
我希望能夠做的就是採取如下:的httpd - 反向代理多個端口
http://localhost:10000
http://localhost:11000
http://localhost:12000
和路由他們喜歡的分別如下:
http://my-app (this is port 10000 traffic)
http://my-app/app (this is port 11000 traffic)
http://my-app/blog (this is port 12000 traffic)
這裏是我的conf.d文件 -
<VirtualHost *:80>
ServerName my-app.domain.com
ServerAlias my-app
Redirect/https://my-app.domain.com/
</VirtualHost>
<VirtualHost *:443>
ServerName my-app.domain.com
ServerAlias my-app
Include ssl/default/ssl.cfg
RewriteEngine On
ProxyRequests Off
ProxyPreserveHost On
RemoteIPHeader X-Forwarded-For
RequestHeader set X-FORWARDED-SSL on
RequestHeader set X-FORWARDED_PROTO https
ProxyTimeout 900
TimeOut 900
RewriteRule ^$/[R]
ProxyPass/http://localhost:10000/
ProxyPassReverse/http://localhost:10000/
RewriteRule ^/app/(.*) http://localhost:11000/$1 [P,L]
ProxyPassReverse /app/ http://localhost:11000
</VirtualHost>
重新直接正在爲初始端口,而不是交通要口11000我知道我在做someth愚蠢但我不知道是什麼。