Fórum

Removing :8080 from the URL

Mike Cunneen, modificado 15 Anos atrás.

Removing :8080 from the URL

Junior Member Postagens: 55 Data de Entrada: 21/11/08 Postagens Recentes
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
Stan M, modificado 15 Anos atrás.

RE: Removing :8080 from the URL

Regular Member Postagens: 208 Data de Entrada: 28/01/08 Postagens Recentes
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
Gustavo Fernández Gómez, modificado 15 Anos atrás.

RE: Removing :8080 from the URL

Regular Member Postagens: 191 Data de Entrada: 26/10/07 Postagens Recentes
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
Rob Sonke, modificado 15 Anos atrás.

RE: Removing :8080 from the URL

Expert Postagens: 275 Data de Entrada: 26/08/07 Postagens Recentes
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.
Dennis Grzywatz, modificado 15 Anos atrás.

RE: Removing :8080 from the URL

New Member Postagens: 14 Data de Entrada: 22/10/08 Postagens Recentes
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
steve rieger, modificado 15 Anos atrás.

RE: Removing :8080 from the URL

Expert Postagens: 436 Data de Entrada: 11/09/06 Postagens Recentes
switch from mod_jk to mod_proxy
proxypass and proxypassreverse

then block port 8080
Dennis Grzywatz, modificado 15 Anos atrás.

RE: Removing :8080 from the URL

New Member Postagens: 14 Data de Entrada: 22/10/08 Postagens Recentes
Hi Steve,

thanks for the information, it worked!

regards,

...
David Sims, modificado 15 Anos atrás.

RE: Removing :8080 from the URL

New Member Mensagem: 1 Data de Entrada: 03/04/09 Postagens Recentes
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
Olaf Kock, modificado 15 Anos atrás.

RE: Removing :8080 from the URL

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
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.
Dennis Grzywatz, modificado 15 Anos atrás.

RE: Removing :8080 from the URL

New Member Postagens: 14 Data de Entrada: 22/10/08 Postagens Recentes
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
li guicheng, modificado 13 Anos atrás.

RE: Removing :8080 from the URL

Junior Member Postagens: 25 Data de Entrada: 29/03/10 Postagens Recentes
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
Olaf Kock, modificado 13 Anos atrás.

RE: Removing :8080 from the URL

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
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
gnp present, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Junior Member Postagens: 54 Data de Entrada: 09/06/10 Postagens Recentes
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
David H Nebinger, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Liferay Legend Postagens: 14917 Data de Entrada: 02/09/06 Postagens Recentes
thumbnail
gnp present, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Junior Member Postagens: 54 Data de Entrada: 09/06/10 Postagens Recentes
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
David H Nebinger, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Liferay Legend Postagens: 14917 Data de Entrada: 02/09/06 Postagens Recentes
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
gnp present, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Junior Member Postagens: 54 Data de Entrada: 09/06/10 Postagens Recentes
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
Suresh Nimmakayala, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Liferay Master Postagens: 690 Data de Entrada: 18/08/04 Postagens Recentes
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
gnp present, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Junior Member Postagens: 54 Data de Entrada: 09/06/10 Postagens Recentes
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
Suresh Nimmakayala, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Liferay Master Postagens: 690 Data de Entrada: 18/08/04 Postagens Recentes
give it a go
thumbnail
gnp present, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Junior Member Postagens: 54 Data de Entrada: 09/06/10 Postagens Recentes
not works!
thumbnail
gnp present, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Junior Member Postagens: 54 Data de Entrada: 09/06/10 Postagens Recentes
NOT WORKS!
thumbnail
David H Nebinger, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Liferay Legend Postagens: 14917 Data de Entrada: 02/09/06 Postagens Recentes
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
Olaf Kock, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
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
gnp present, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Junior Member Postagens: 54 Data de Entrada: 09/06/10 Postagens Recentes
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
David H Nebinger, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Liferay Legend Postagens: 14917 Data de Entrada: 02/09/06 Postagens Recentes
gnp present:
Hi, using proxy_mod , and SOLVED!!!


+1 for doing things the right way.
thumbnail
gnp present, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Junior Member Postagens: 54 Data de Entrada: 09/06/10 Postagens Recentes
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
Suresh Nimmakayala, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Liferay Master Postagens: 690 Data de Entrada: 18/08/04 Postagens Recentes
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
gnp present, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Junior Member Postagens: 54 Data de Entrada: 09/06/10 Postagens Recentes
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
Ramalingaiah Dudidmetle, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Expert Postagens: 486 Data de Entrada: 16/08/14 Postagens Recentes
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
Suresh Nimmakayala, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Liferay Master Postagens: 690 Data de Entrada: 18/08/04 Postagens Recentes
step 2. remove in portal-ext.properties

web.server.host=www.mydomain.com
web.server.http.port=80
web.server.https.port=443
thumbnail
Muhammed Shafeek V, modificado 9 Anos atrás.

RE: Removing :8080 from the URL

Regular Member Postagens: 140 Data de Entrada: 22/07/13 Postagens Recentes
Hi,

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


hope that help,

Shafeek.