访问 http://domain:port 的其他方式

Other way to access http://domain:port

我目前 运行 一个 Ubuntu 14.04 的 Apache 服务器,还有一个 TOMCAT 服务器和一个 Calibre 服务器(运行 分别在端口 8080 和 8081 上).

我可以通过键入

通过 firefox 与他们联系
http://localhost:8080 // For TOMCAT
http://localhost:8081 // For Calibre

我想知道我应该调整或设置什么才能通过键入联系到他们

http://tomcat.localhost/ or http://localhost/~user/tomcat

http://calibre.localhost/ or http://localhost/~user/Calibre

(如果可能,我希望第一个选项最好)

是否可以在不安装 DNS 服务器的情况下执行此操作? (如果需要我可以使用它,但我更乐意不使用我不习惯的技术)

我在 localhost/~user/Calibre/index.php 中尝试了 PHP 包含或重定向,但这非常不雅(而且我无法让它正常工作)

我的目标是让它在我本地网络上的不同计算机上使用(因此跨导航器和跨计算机兼容性是一个更好的解决方案,但如果它暂时只在我的计算机上工作我会很高兴)。

如有任何帮助,我们将不胜感激。

非常感谢

您应该创建一个虚拟主机以使用多个域。按照文章进行存档。如果您有任何疑问,请告诉我。 https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts