我在家里玩一个新的设置,不确定我想做的是可能的还是不可能的。
我的域名DNS指向我的广域网IP,并在80端口的Ubuntu14.04服务器上得到Apache的响应,所有这些都正常工作。然而,我想把它混在一起,这是我想要完成的。
运行在apache服务器上的虚拟主机侦听基于名称的路由。类似于:
wp.me.com -> forwarded to my Ubuntu server and fed Wordpress from Apache
fw.me.com -> forwarded to server and redirected to 192.168.1.1:8443 to acc
我正在使用Apache2为我的tomcat执行反向代理。
我的域名是https://dev.domain.com,将被重定向到http://127.0.0.1:8080/MyApp
代理是可以的,但是tomcat在根文件夹(http://127.0.0.1:8080/assets)中有一个资产文件夹。
在加载我的dev.domain.com页面时,对于要显示的每个资产元素,我都有一个404错误。下面是我的VirtualHost配置:
ServerAdmin webmaster@localhost
proxyRequests Off
SSLProxyEngine on
我有一个用于显式声明服务器名称的配置:
<VirtualHost *:80>
ServerAdmin me@myco.com
ServerName sub0.sub1.myco.com
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://sub0.sub1.myco.com:8080/mobilecommerce
请提供以下内容:
http://subdomain.test.co.uk/newsite --> redirect to apache port 80
http://subdomain.test.co.uk --> redirect to iis on port 8080
我已经将IIS更改为在8080上运行,两个站点都使用localhost运行得很好。
我还在httpd.conf中启用了以下功能
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module module