我一直在关注虚拟主机配置。理想的结果是:
2号正在工作,但1号却没有。有人可以帮忙吗!
<VirtualHost *:80> ServerName test.myserver.com Alias /myapp /var/www/myapp <Directory /var/www/myapp> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> ProxyPass / http://localhost:8069/ ProxyPassReverse / http://localhost:8069/ </VirtualHost>
这就是我能够达到预期结果的方式。以下是有效的配置,ProxyPassMatch ^/myapp !除了(服务器地址)/ myapp外,所有请求都正在代理到另一台运行在端口8069的open-erp服务器:
ProxyPassMatch ^/myapp !
<VirtualHost *:80> ServerName test.myserver.com Alias /myapp /var/www/myapp <Directory /var/www/myapp> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> ProxyPassMatch ^/myapp ! ProxyPass / http://localhost:8069/ ProxyPassReverse / http://localhost:8069/ CustomLog /var/log/apache2/access.log common ErrorLog /var/log/apache2/error.log </VirtualHost>