Why Run apache2 on a different port?berryjam.ru
At times, it might be necessary to have multiple http servers running, either on the same computer, or on different computers on the same network, with only one outside IP address.теплоизоляция скатной кровли частного дома. Принцип работы традиционного сэндвича
In my case, I would like to build a web client for my home automation, and would like this accessible, but not on the standard port 80 used for http traffic.
In the end of this tutorial, you should have apache2 running on port 8080. For the purpose of this demonstration, the server is running on a Raspberry Pi. I would like this in addition to the normal listening port of 80.
Things to keep in mind
Once you have everything working correct, you will need modify your router to forward port 8080 to the IP address of your Raspberry Pi, so that incoming requests are directed to the right computer.
The configuration file for apache is located at (at least the configuration file for the ports to be listed to):
Edit the configuration file using the command:
Add the line:
Restart the server:
You should now be able to access your web server by going to: