Can't connect to my local Apache server on port 8079

281 Views Asked by At

I added the following line to my httpd.conf: Listen *:8079. But when I navigate to my-local-ip-address:8079 in a browser, it says that the site can't be reached. I also have the line Listen *:80 in my httpd.conf, and when I navigate to my-local-ip-address:80 in a browser, it works. Why does it only work for port 80 and not for port 8079? Thanks!

1

There are 1 best solutions below

0
masterguru On

Adding just a new Listen is not enough.

You should check your <virtualhost> directives in your apache config files and add the :port in them as necessary or you can copy a complete <virtualhost> directive with same values but in different port just adding the port like this:

 <VirtualHost 10.1.2.3:8079>

Check full information in this documentation:

You can specify a :port to change the port that is matched. If unspecified then it defaults to the same port as the most recent Listen statement of the main server. You may also specify :* to match all ports on that address. (This is recommended when used with default.)