【发布时间】:2016-05-10 00:36:06
【问题描述】:
我有一个 CentOs 7.1,Apache httpd 在端口 9000 上运行。
如果我在浏览器中输入:http://192.168.56.101:9000/ 我会看到 Apache Testing 123 页面。
我还有一个 GitLab 服务器在端口 8888 上运行,但该端口已被防火墙关闭。
我希望 Apache 在内部将流量重定向到 http://192.168.56.101:9000/gitlab 到 GitLab 服务器。
我已在我的 Apache 配置文件 /etc/httpd/conf/httpd.conf 中完成此操作:
<VirtualHost *:9000>
ProxyPass /gitlab http://192.168.56.101:8888/users/sign_in
ProxyPassReverse /gitlab http://192.168.56.101:8888/users/sign_in
</VirtualHost>
当用户浏览到http://192.168.56.101:9000/gitlab 时,会出现登录页面(虽然css 似乎坏了),但登录时会出现:
Not Found
The requested URL /users/sign_in was not found on this server.
这是否可以通过 Apache 进行配置?如果可以,如何配置?
我是否需要使用某种 Url-Rewriting,如果需要,使用哪种方法以及如何开始?
【问题讨论】:
标签: apache url-rewriting url-redirection httpd.conf