【发布时间】:2015-03-15 20:58:52
【问题描述】:
我在端口 8069 上运行 odoo,我想在同一个域的端口 80 上运行 wordpress。我想将 example.com* 重定向到端口 8069,除了我想转到端口 80 的 example.com/wordpress*。
我知道这类似于Redirecting from port 80 to different ports based on URL。我想按照 abhi-devireddy 的建议实施反向代理解决方案。我尝试了以下反向代理。所有请求都转发到端口 8069,包括http://example.com/wordpress/。当浏览器指向http://example.com/wordpress时,Odoo 报错 404 page not found
<VirtualHost *:80>
ServerName odoo
ErrorLog /var/log/odoo/odoo-error.log
CustomLog /var/log/odoo/odoo-access.log combined
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://example.com:8069/
ProxyPassReverse / http://example.com:8069/
ProxyPass http://example.com/wordpress/ http://example.com:80/wordpress
ProxyPassReverse http://example.com/wordpress/ http://example.com:80/wordpress
ProxyVia On
LogLevel warn
</VirtualHost>
【问题讨论】:
标签: redirect apache2 port openerp reverse-proxy