【问题标题】:The domain is not pointing to the application in tomcat, but instead points to the Ubuntu Default page域不是指向tomcat中的应用程序,而是指向Ubuntu默认页面
【发布时间】:2014-08-31 03:00:38
【问题描述】:

当我在浏览器 (example.com) 中输入我的域名时,它会将我带到 Ubuntu 的默认页面,而不是把我带到应用程序。我在 server.xml 中有以下设置

<Host name="example.com" debug="0" appBase="webapps/socialapp" unpackWARs="true" autoDeploy="true">
        <Context path="/socialapp" docBase="" debug="0" reloadable="false"/>
        <Alias>example.com</Alias>
        <Context path="" docBase="" privileged="true"/> 
         <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs/socialapp"
               prefix="socialapp_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
    </Host>

Hosting账户中的A记录指向IP地址,Cname中有www和@。 我希望 example.com 指向 tomcat 7 的 webapps/socialapp 文件夹。

【问题讨论】:

    标签: java apache tomcat jakarta-ee


    【解决方案1】:

    我认为出现此问题是因为您没有在应用中设置欢迎页面。
    为此,请在您的应用中编辑您的 web.xml,如下所示:

    <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
     </welcome-file-list>
    

    在 web.xml 文件中添加上述标签over所有标签。此标签将 index.jsp 设置为您应用的主页。

    希望对你有帮助。

    【讨论】:

      猜你喜欢
      • 2015-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多