我是一名Java开发人员,他被授予在远程服务器上运行Liferay Portal的任务(我有一个IP和root访问权限)。 服务器已经有一个旧的Liferay和Apache Web服务器的实例。 我想设置额外的Liferay Portal并通过在该服务器上运行的ip:port访问它们。
我怎样才能使用Apache在不同的端口上运行多个站点?
你需要阅读VirtualHosts – 你的httpd.conf中大致有如下的内容:
Listen 80 <VirtualHost *:80> ServerName liferay-old.example.com DocumentRoot /var/www #### Server config for 'old' version of Liferay goes here </VirtualHost> Listen 8080 <VirtualHost *:8080> Server liferay-new.example.com DocumentRoot /var/www #### Server config for 'old' version of Liferay goes here </VirtualHost>