I use centOS server. I want to configure apache to listen on port 8079. I added LISTEN 8079 directive in httpd.conf
.
I opened port 8079 in iptables and restarted iptables. I even stopped iptables service.
"netstat -nal | grep 8079" shows "tcp 0 0 :::8079 :::* LISTEN"
If I try to access http://localhost:8079
or http://myserver.com:8079
from that machine, I can access that page. BUT from any other machine I am not able to access the site on any port other than 80. On port 80, it works. On port 8079 it does not.
What else do I need to configure?
Multiple ports can be configured via Listen directive under Apache web server. By default httpd listens on TCP port 80.
During installation, port 80 is required to install the Apache web server. If you have another product installed that uses port 80, you must change the Apache HTTP port to another port number before you start the application that is using port 80.
If you opt for the TLS configuration, the server will listen for secure connections on port 443. In order to instruct Apache web server to bind and listen for web traffic on other ports than the standard web ports, you need to add a new statement containing the newly port for future bindings.
In /etc/apache2/ports.conf
, change the port as
Listen 8079
Then go to /etc/apache2/sites-enabled/000-default.conf
And change the first line as
<VirtualHost *: 8079>
Now restart
sudo service apache2 restart
Apache will now listen on port 8079 and redirect to /var/www/html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With