当前位置: 动力学知识库 > 问答 > 编程问答 >

dns - liferay 6.1 & Tomcat 7 - change port

问题描述:

After install Liferay 6.1 on Tomcat I want to execute my web app as http:// myportal.local.

I change file hosts:

127.0.0.1 myportal.local

I change file server.xml

from <Connector port="8080"... to <Connector port="80"...

But when I type URL http:// localhost or http:// myportal.local the response is a white page with

It works!

May you help me please?

网友答案:

The port 80 is the port used by apache where all the http requests are served. By this line

127.0.0.1 myportal.local

you have given a name to your localhost so

http://localhost and http://myportal.local 

will point to your apache port 80

Now you will be shown a white page with 'It works'. This is the index.html file present in your apache..

So what you have to do is, Keep your tomcat port as 8080 itself and edit your workers.properties and httpd.conf in your apache and redirect all the request to your tomcat.

Then you can either put your webapp inside the webapps/Root or edit your server.xml accordingly to reflect the url changes.

Don't forget to restart apache and tomcat after editing all these files.

分享给朋友:
您可能感兴趣的文章:
随机阅读: