Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Listen configuration [closed]

What is the difference between the following configurations

Listen *:80 //anything at port 80
Listen 192.168.0.34:80 //from an internal ip on port 80
Listen 173.194.35.23:80 //from an external ip on port 80

Which of them is the best configuration (if there is any difference between them). I want my server to be accessed from internet not just from a LAN.

like image 957
pbaris Avatar asked Nov 01 '12 12:11

pbaris


1 Answers

I always use *:80.

You can only listen on IPs that are actually bound to the network cards of your server but it's poor practice to have a server that straddle internal and external networks, IMHO, so I wouldn't define internal and external addresses.

The only time I think it is necessary to be specific about what IP address you listen on is if you have particular IP based virtual hosting.

like image 82
Alastair McCormack Avatar answered Oct 21 '22 03:10

Alastair McCormack