Tomcat has a project topic, which is accessed by default at localhost:8080/topic and is now bound to the domain name topic.luger.me. The config file of apache is written like this
<VirtualHost 127.0.0.1>
DirectoryIndex /topic/index.jsp
ServerName topic.luger.me
Options FollowSymLinks
rewriteengine on
</VirtualHost>
When accessing, you can still access topic.luger.me/topic. How to write RewriteRule rules so that they can be accessed when
topic.luger.me
I have always been wrong when writing this ^(.*) /topic/$1
I can't access it all the time. What's wrong?
You can directly
DocumentRoot
指定到topic
路径下,DirectoryIndex /topic/index.jsp
DocumentRoot can’t point directly to the topic? Equivalent to creating a new vhost
Do you want to access topic.luger.me and map it to localhost:8080/topic?