# Apache - Listen localhost?



## setevoy (Apr 10, 2013)

Hello.

I configured Apache and NGINX a few days ago, and got a strange problem.


```
# cat apache22/httpd.conf | grep List
Listen 127.0.0.1:8080	
	
# cat nginx/nginx.conf | grep list
   listen         178.***.***.114:80;
```


E.g. Apache must work only on 127.0.0.1 - but it's listening on the external IP:


```
# netstat -an | grep 80
tcp4       0      0 178.***.***.114.8080    *.*                    LISTEN
tcp4       0      0 178.***.***.114.80      *.*                    LISTEN
```

Nowhere in configuration is  178.***.***.114:


```
# grep -R "178.***.***.114" /usr/local/etc
./apache22/httpd.conf:RPAFproxy_ips       178.***.***.114
./nginx/nginx.conf:   listen         178.***.***.114:80;
./nginx/nginx.conf:   listen 178.***.***.114:80;
```

Only RPAF - but it does not impact on Apache? And RPAF was installed last.

As a result, when I configure both servers on port 80 - one of them refused to work. Similar scheme works good on the same server (e.g. port 80 - but different IP to listen).

It works good now on different ports - but it's interesting for me - why is Apache listening on the external IP?

Can somebody please explain to me what I'm doing wrong?


----------



## SirDice (Apr 10, 2013)

Set the Listen directive in Apache's httpd.conf.


----------



## setevoy (Apr 10, 2013)

SirDice said:
			
		

> Set the Listen directive in Apache's httpd.conf.



It already is:


```
# cat apache22/httpd.conf | grep List
Listen 127.0.0.1:8080
```

Or what did you mean?


----------



## SirDice (Apr 10, 2013)

Is this perhaps inside a jail?


----------



## setevoy (Apr 10, 2013)

SirDice said:
			
		

> Is this perhaps inside a jail?



Yes, thanks - I got same tip on russian FreeBSD forum


----------

