How can I open specific ports for my Apache server?
How can I open specific ports for my apache server under linux? I'm trying to build a connection with a online game that sends messages and receives to a specific port. I want to make my apache server/linux machine to listen to that specific port. bottom line, being able to receive/send data from/to that port
Solution 1:
You can take a look at binding Apache to specific ports here.
I assume you're aware that you don't normally choose the port from which you're sending data, unless this is in a response to an already established connection.
For example, to make the server accept connections on both port 80 and port 8000, on all interfaces, use:
Listen 80
Listen 8000
To make the server accept connections on port 80 for one interface, and port 8000 on another, use
Listen 192.0.2.1:80
Listen 192.0.2.5:8000