【问题标题】:configuring URL mapping配置 URL 映射
【发布时间】:2016-03-14 10:49:02
【问题描述】:

我在 Linode 有一个云主机。这是我的 IP:123.456.789.111

我有这个配置文件 /etc/apache2/sites-available/nunitocalzada.com.conf

# domain: example.com
# public: /var/www/nunitocalzada.com/public_html/

    <VirtualHost *:80>
      # Admin email, Server Name (domain name), and any aliases
      ServerAdmin webmaster@nunitocalzada.com
      ServerName  www.nunitocalzada.com
      ServerAlias nunitocalzada.com

      # Index file and Document Root (where the public files are located)
      DirectoryIndex index.html index.php
      DocumentRoot /var/www/nunitocalzada.com/public_html
      # Log file locations
      LogLevel warn
      ErrorLog  /var/www/nunitocalzada.com/log/error.log
      CustomLog /var/www/nunitocalzada.com/log/access.log combined
    </VirtualHost>

我在同一台服务器上也有一个 tomcat 应用程序。 这是应用程序的 URL http://123.456.789.111:8080/myapp/

我想进入这个域 www.nunitocalzada.com 中的应用程序

所以我创建了这个文件/var/www/nunitocalzada.com/public_html/index.html

<html><head><title>Nunito Calzada</title></head>
<frameset cols="*">
 <frame name="main" src="http://123.456.789.111:8080/myapp/" scrolling="auto" noresize>
 <noframes>
 <body>

 Your browser does not support frames

 </body>
 </noframes>
</frameset>
</html>

但我想有更好的方法来做到这一点

【问题讨论】:

    标签: apache ubuntu linode


    【解决方案1】:

    执行此操作的标准方法是通过反向代理,这样可以避免在 URL 或框架中使用高端口号。网络上有大约一万亿种在 Tomcat 前使用带有 mod_proxy 的 Apache 的方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-19
      • 2017-10-06
      • 1970-01-01
      • 2016-03-07
      • 2019-11-01
      • 1970-01-01
      相关资源
      最近更新 更多