I'm running CentOS on my server, and I want to forward port of Liferay portal from 8080 to 80. I've changed the server.xml file but I can not connect to portal. Log from Catalina.out is fine, it shows that server started up. I have got also installed httpd on CentOS. netstat -tulpn shows that port 80 is not in use.
I will be thankful for any guide or help.
It's best practice to have Apache or any other webserver of your choice serve port 80/443 and forward traffic to the application server. There's a lot of information all over the internet, my version is in this blog article and the related ones, linked at the bottom of the article.
Related
I am trying to run an ubuntu apache server on Google cloud platform, I have created the VM instances but I can't connect to any other port apart for from 80 and 22.
Here are all the things I've tried so far:
Created Firewall rules to allow ingress traffic to ports 21,20 and 443.
Created FireWall rules on the Ubuntu Machine itself
The only ports that seem to be open are the 80 and 22.
I also allowed both HTTP and HTTPS access in the VM settings
So Basically, what I am trying to do is to open ports on my server. I'm not sure what am doing wrong.
You have already installed apache, and it's running on the port 80 as you can see on the nmap test, a closed port just mean that there's no application running on that port, this is different to filtered, see this for more information, this confirms that your firewall rules are correct (you are allowing traffic from all sources 0.0.0.0/0). By now you should be able to access your website on the port 80, if not I suggest you to follow this GCP guide.
So, if you want to run apache on the port 443 you just need to change its configuration (basically you will need to get a certificate for your server, configure some related parameters and then create a virtualhost listening on the 443 port, there are many guides on the internet for this just google for "enable https apache [your_OS]"), that should be enough since the firewall rules on GCP and your instance appear to be properly configured.
I have nginx running at port 80.
After installing apache2, I set its port to 82 (both in ports.conf and 000-default.conf).
I have tried opening the ip (i.e a.b.c.d:82) but its not opening. But if I set port to 80 and stop nginx then its opening.
I tried opening ip with the below format:
a.b.c.d:82
a.b.c.d - opening nginx site
I also tried setting dns to abc.mydomain.com and opened
abc.mydomain.com (opening nginx site)
abc.mydomain.com:82 (not opening anything)
How to access it using apache with some port other than 80 ?
Please let me know for more questions.
Thanks.
The discussion and investigation in the chat revealed that this actually was about a remote system, not a local development setup. That means that typically a package filter ("firewall") is in between client and sever. When using a non standard port for a "well known protocol" you need to open that port in the servers firewall for incoming traffic.
In this case using Ubuntu's ufw tool had been used to setup a simple package filter. Configuring the custom port 82 and allowing incoming traffic to it solved the issue at hand.
I have a java application running on glassfish 4.1, the url to access the system is a sobdomain, eg
subdomain.mydomain.com:8060/ProjectName
I wanted to make it work without entering the port
(subdomain.mydomain.com/ProjectName)
.
I've tried to change the port of the http-listener-1 to 80, but after that the domain of glassfish does not boot anymore.
Any idea how to run without the user having to enter the port?
There are a couple of reasons why you should not use Glassfish listening to 80 directly.
Firstly port 80 is reserved, it's not easy to make a non special user to open 80 on a *nix environment.
It's common and recommended to install apache or nginx on port 80 and use mod_proxy_ajp to connect Apache or nginx to Glassfish through port 8009
Oracle wiki
I have a windows server 2008 VPS with no software installed on it and the only way to connect to it is remote desktop connection so I have to prepare it from scratch.
I installed apache server on it BUT after installing apache:
ON THE VPS:
when i go to localhost i get the "it works!" Home page so this sounds ok.
and "Netstat -a" results shows port 80 ok as following:
From other pc
- can't go to homepage via browser.
NOTE: I don't have a domain but i wish to access via browser using the VPS ip.
nevermind guys it worked now.
I just added port 80 to firewall. I thought that if the port stats is Listening then it is ok but I found out that I have to add the port to the firewall too.
I already installed Tomcat server while developing my java web app. But I also needed to get access to my database using PHPMyAdmin and install MySQL as well, so I downloaded XAMPP. I cannot disable apache server since I already have Tomcat. Now my struggle is, I cannot open
"localhost:8080" which was my original port. It's now replaced with simply "localhost".
Can you help me fix this error? THANK YOU :D
Sounds like you now have:
Tomcat serving traffic on port 8080, as it always has (at http://localhost:8080)
Apache/XAMPP serving traffic on port 80 (at http://localhost, obviously with the port missing since 80 is the default http port)
Assuming that's the case, you don't have a problem. Serving http traffic from different ports on the same host is not an issue.