掲示板

Removing :8080 from the URL

15年前 に Mike Cunneen によって更新されました。

Removing :8080 from the URL

Junior Member 投稿: 55 参加年月日: 08/11/21 最新の投稿
Hi,

I have searched everywhere but can't figure out how to do this.

Basically, I want to remove the :8080 from my urls so I my portal will be ready for deployment. When I type in http://localhost/ I want to access the portal, rather than typing in http://localhost:8080

How does one do this?

Any advice would be great!

Thanks in advance,

Mike
15年前 に Stan M によって更新されました。

RE: Removing :8080 from the URL

Regular Member 投稿: 208 参加年月日: 08/01/28 最新の投稿
Provided that you use Apache/Tomcat, the port setting is at $CATALINA_HOME/conf/server.xml. You will need to change the port 8080 to 80.

You may want to also check the "Portal Administrator's Guide" and your server's specific settings before deployment.
thumbnail
15年前 に Gustavo Fernández Gómez によって更新されました。

RE: Removing :8080 from the URL

Regular Member 投稿: 191 参加年月日: 07/10/26 最新の投稿
if you change the port that coyote is listening (coyote is the tomcat http connector) you are still serving the pages from coyote.
I think is better to put apache web-server behind tomcat and your clients and then use ajp13 protocol (apache mod_jk) to redirect the request from apache to tomcat... you can also turn off the coyote connector.
thumbnail
15年前 に Rob Sonke によって更新されました。

RE: Removing :8080 from the URL

Expert 投稿: 275 参加年月日: 07/08/26 最新の投稿
I agree with Gustavo, changing tomcat to run on port 80 will also force you to run it by the root user. Adding apache in front has a lot of advantages.
15年前 に Dennis Grzywatz によって更新されました。

RE: Removing :8080 from the URL

New Member 投稿: 14 参加年月日: 08/10/22 最新の投稿
Hello,

I found this thread and have one question regarding firewall settings:

I have configured Tomcat being behind Apache2 using the ajp13 (mod_jk) stuff, wasn't too hard at all. Now I want to configure a hardware firewall and ask myself, if I could block port 8080 from outside, since incoming connections go via Apache2 virtual host on port 80.

Does anyone know if port 8080 still needs to be open to public?

Kind regards,

Dansen
thumbnail
15年前 に steve rieger によって更新されました。

RE: Removing :8080 from the URL

Expert 投稿: 436 参加年月日: 06/09/11 最新の投稿
switch from mod_jk to mod_proxy
proxypass and proxypassreverse

then block port 8080
15年前 に Dennis Grzywatz によって更新されました。

RE: Removing :8080 from the URL

New Member 投稿: 14 参加年月日: 08/10/22 最新の投稿
Hi Steve,

thanks for the information, it worked!

regards,

...
15年前 に David Sims によって更新されました。

RE: Removing :8080 from the URL

New Member 投稿: 1 参加年月日: 09/04/03 最新の投稿
Just to offer one potentially useless suggestion: although having Apache field requests at port 80 and forwarding them to Tomcat at port 8080 is usually what people do, there's another possibility. On Linux boxes, you can use iptables to redirect requests from port 80 to port 8080. This allows Tomcat to run as non-root on port 8080 and means you don't have to deploy Apache. In my case, the RAM saved on my slice was worth it, not to mention the simpler machine configuration.

I followed this tip to get iptables redirecting the port 80 traffic to port 8080:

http://esupport.marvinsweb.net/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=138

FWIW,
David
thumbnail
15年前 に Olaf Kock によって更新されました。

RE: Removing :8080 from the URL

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Dennis Grzywatz:
Does anyone know if port 8080 still needs to be open to public?


You seem to have already solved your problem, but just for the records, let me add: If nobody from the public accesses port 8080 you don't need it open for the public.

If Apache forwards to port 8080 (i.e. via mod_proxy) and lives on the same server, you can configure the connection to go to 127.0.0.1, which is usually no problem for firewalls - especially not if you're talking about hardware firewalls - I understand that this would be a different box without any knowledge about your webservers notion of 127.0.0.1.

If Apache and (e.g.) Tomcat live on different servers that are not connected through said firewall (e.g. because both are behind the same firewall) you also can block all access to tomcat from the public.

Last: This forum category contains a lot of questions and good answers about mod_jk, mod_proxy and related configuration means to publish liferay sites on port 80 instead of 8080.
15年前 に Dennis Grzywatz によって更新されました。

RE: Removing :8080 from the URL

New Member 投稿: 14 参加年月日: 08/10/22 最新の投稿
Hi,

I still have to have Apache 2 for other reasons, so the port forwarding sounds nice, but I cannot use it here. And yes, the server is behind a hardware (shared) firewall. I also searched the tipps here at Liferay forums but could not find any hint if 8080 can be blocked.

Thanks for the help,

Eric
13年前 に li guicheng によって更新されました。

RE: Removing :8080 from the URL

Junior Member 投稿: 25 参加年月日: 10/03/29 最新の投稿
Hi, Olaf

I want to ask another question about putting Tomcat behind Apache. I active the two modules on Apache to remove the 8080 from the URL.
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
I used to put some big files at apache/htdocs to let download from the url http://localhost/abc.file. But When actived the two modules, all request are now go to tomcat. And I don't know where to put my file and what the URL will be!

Any hints?

Thanks in advance.

li guicheng
thumbnail
13年前 に Olaf Kock によって更新されました。

RE: Removing :8080 from the URL

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
You can either configure Liferay to be not on the root context "/", but, for example, on "/portal", so that Apache needs to forward just this URL-path to Liferay. This frees up all the other paths that can be delivered by Apache.

If you use mod_jk and the JkMount directive, note that there's also a JkUnmount (or JkUnMount) directive (are they case-sensitive?), that allows you to name exceptions for the JkMount rules - e.g. "JkUnmount /static" will deliver the URL-path /static/* from Apache
thumbnail
9年前 に gnp present によって更新されました。

RE: Removing :8080 from the URL

Junior Member 投稿: 54 参加年月日: 10/06/09 最新の投稿
Hello,

i installed liferay 6.2 CE GA3 to centos 6.x 64 bit. My liferay site can be access now to myip.com:8080 . How make the liferay site to be access to myip.com? without 8080! can you help me with this please?
thank you
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: Removing :8080 from the URL

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
thumbnail
9年前 に gnp present によって更新されました。

RE: Removing :8080 from the URL

Junior Member 投稿: 54 参加年月日: 10/06/09 最新の投稿
Thank you very much SIR, but i don’t understand what you explain in your link....seems to be very complicated to me what you describe there. Another simple way doesn’t exist?

thank you
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: Removing :8080 from the URL

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
gnp present:
Thank you very much SIR, but i don’t understand what you explain in your link....seems to be very complicated to me what you describe there. Another simple way doesn’t exist?


One that's worth pursuing? No.
thumbnail
9年前 に gnp present によって更新されました。

RE: Removing :8080 from the URL

Junior Member 投稿: 54 参加年月日: 10/06/09 最新の投稿
It’s not enough to do that in portal-ext.properties?

# domain name of web server
web.server.host=www.mydomain.com
# http port of web server
web.server.http.port=80
# https port of web server
web.server.https.port=443
thumbnail
9年前 に Suresh Nimmakayala によって更新されました。

RE: Removing :8080 from the URL

Liferay Master 投稿: 690 参加年月日: 04/08/18 最新の投稿
did you changed in in bundles server.xml in the folder .......... /conf/server.xml

check Connector port

<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443" URIEncoding="UTF-8" />
thumbnail
9年前 に gnp present によって更新されました。

RE: Removing :8080 from the URL

Junior Member 投稿: 54 参加年月日: 10/06/09 最新の投稿
No.

so …step 1.
change in server.xml connector port to 80

step 2. add in portal-ext.properties

web.server.host=www.mydomain.com
web.server.http.port=80
web.server.https.port=443

step3 - restart server


it.s correct ?
thumbnail
9年前 に Suresh Nimmakayala によって更新されました。

RE: Removing :8080 from the URL

Liferay Master 投稿: 690 参加年月日: 04/08/18 最新の投稿
give it a go
thumbnail
9年前 に gnp present によって更新されました。

RE: Removing :8080 from the URL

Junior Member 投稿: 54 参加年月日: 10/06/09 最新の投稿
not works!
thumbnail
9年前 に gnp present によって更新されました。

RE: Removing :8080 from the URL

Junior Member 投稿: 54 参加年月日: 10/06/09 最新の投稿
NOT WORKS!
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: Removing :8080 from the URL

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
gnp present:
NOT WORKS!


The method I outlined will work and is used by real administrators around the world.

Tomcat listening on port 80? That is a hack that no real administrator would recommend.
thumbnail
9年前 に Olaf Kock によって更新されました。

RE: Removing :8080 from the URL

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
David H Nebinger:
The method I outlined will work and is used by real administrators around the world.

Tomcat listening on port 80? That is a hack that no real administrator would recommend.


I want to second this (and want it to stand at the end of this thread). Go this way, don't change tomcat's actual port to 80. And the entries in portal(-ext).properties that are mentioned in this thread don't change any actual port on their own. They just tell Liferay what port to use in case it can't figure this out itself (which might be the case when you use mod_proxy for http forwarding instead of AJP (mod_jk or mod_proxy_jk).

Do what David says!
thumbnail
9年前 に gnp present によって更新されました。

RE: Removing :8080 from the URL

Junior Member 投稿: 54 参加年月日: 10/06/09 最新の投稿
Hi,
using proxy_mod , just add in the bottom of httpd.conf file :

NameVirtualHost *:80
<VirtualHost *:80>
ServerName liferay62.local
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost On
</VirtualHost>

and SOLVED!!!

thanks to all for amiability help!!!
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: Removing :8080 from the URL

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
gnp present:
Hi, using proxy_mod , and SOLVED!!!


+1 for doing things the right way.
thumbnail
9年前 に gnp present によって更新されました。

RE: Removing :8080 from the URL

Junior Member 投稿: 54 参加年月日: 10/06/09 最新の投稿
Hi,
using proxy_mod , just add in the bottom of httpd.conf file :

NameVirtualHost *:80
<VirtualHost *:80>
ServerName liferay62.local
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost On
</VirtualHost>

and SOLVED!!!
thumbnail
9年前 に Suresh Nimmakayala によって更新されました。

RE: Removing :8080 from the URL

Liferay Master 投稿: 690 参加年月日: 04/08/18 最新の投稿
remove those entries in portal-ext and restart and see what happens

because my default values are same

##
## Web Server
##

#
# Set the HTTP and HTTPs ports when running the portal in a J2EE server that
# is sitting behind another web server like Apache. Set the values to -1 if
# the portal is not running behind another web server like Apache.
#
web.server.http.port=-1
web.server.https.port=-1

#
# Set the hostname that will be used when the portlet generates URLs.
# Leaving this blank will mean the host is derived from the servlet
# container.
#
web.server.host=
thumbnail
9年前 に gnp present によって更新されました。

RE: Removing :8080 from the URL

Junior Member 投稿: 54 参加年月日: 10/06/09 最新の投稿
theese
web.server.http.port=-1
web.server.https.port=-1

is seting to 80,443 in portal-ext.properties


how remove? or from where must removed? portal-ext.properties rewrite portal.properties
thumbnail
9年前 に Ramalingaiah Dudidmetle によって更新されました。

RE: Removing :8080 from the URL

Expert 投稿: 486 参加年月日: 14/08/16 最新の投稿
E:\Liferay Software\New Softwares\liferay-portal-6.2-ce-ga3\tomcat-7.0.42\conf insed server.xml file
then change in port number 80
in you path open server.xml file insed chack it ,this Line change port number
<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
open eclipse insed Tomcat server folder in open the server.xml and same port number give impotent
thumbnail
9年前 に Suresh Nimmakayala によって更新されました。

RE: Removing :8080 from the URL

Liferay Master 投稿: 690 参加年月日: 04/08/18 最新の投稿
step 2. remove in portal-ext.properties

web.server.host=www.mydomain.com
web.server.http.port=80
web.server.https.port=443
thumbnail
9年前 に Muhammed Shafeek V によって更新されました。

RE: Removing :8080 from the URL

Regular Member 投稿: 140 参加年月日: 13/07/22 最新の投稿
Hi,

https://www.liferay.com/web/shafeek.msv/blog/-/blogs/setup-liferay-6-2-on-ec2-ubuntu-instance-with-apache2


hope that help,

Shafeek.