【发布时间】:2015-03-01 19:46:19
【问题描述】:
我在 OVH 中有 VPS,我使用 j2ee 开发了网站,我使用 mod_jk 将 apache 与 tomcat 相关联。
当我输入 url http://ip_of_vps/myapp 时,我进入网站。
到现在还好
现在我添加重写以仅使用没有上下文的 ip_of_vps (myapp) 访问网站,为此我在 apache2.config 中使用重写,如下所示:
<virtualhost *:80>
RewriteEngine On
LogLevel alert rewrite:trace6
RewriteRule ^/$ http://ip_of_vps/myapp/ [P,L]
</virtualhost>
我将目录中的 All AllowOverride 从 none 更改为 All
当我尝试访问 http://ip_of_vps 时,我有 apache2 主页。
我忘记了什么?
我使用的是 ubuntu 14.04 服务器,apache2,tomcat7。
【问题讨论】:
标签: mod-rewrite apache2