Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache2 and BindAddress troubles
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
eyeswide
n00b
n00b


Joined: 31 Mar 2005
Posts: 12

PostPosted: Tue Jul 05, 2005 12:10 am    Post subject: apache2 and BindAddress troubles Reply with quote

I'm trying to setup apache to work from localhost only, it seems i should just change in /etc/apache2/conf/apache2.conf

Code:

###
### IP Address/Port
###
# BindAddress *
Listen 80

to
Code:

###
### IP Address/Port
###
BindAddress localhost
Listen 80


but apache won't start with BindAddress in the config! even just uncommenenting it fails. :(

Code:

$ /etc/init.d/apache2 start 
 * Apache2 has detected a syntax error in your configuration files:
Syntax error on line 95 of /etc/apache2/conf/apache2.conf:
Invalid command 'BindAddress', perhaps mis-spelled or defined by a module not included in the server configuration


is there a better way?
thx
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Tue Jul 05, 2005 12:14 am    Post subject: Reply with quote

Replace
Code:
Listen 80
with
Code:
Listen 127.0.0.1:80
(Remove the BindAddress first, it does not work for Apache 2)
Back to top
View user's profile Send private message
eyeswide
n00b
n00b


Joined: 31 Mar 2005
Posts: 12

PostPosted: Tue Jul 05, 2005 12:38 am    Post subject: Reply with quote

ok thanks that works, but what about https? port 443 still open on all interfaces. I can disable it for this situation, but now i'm curious.

...it would be nice if the config that comes with apache worked with the version installed...
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Tue Jul 05, 2005 4:07 pm    Post subject: Reply with quote

I think there is a "Listen 443" in /etc/apache2/conf/modules.d/40_mod_ssl.conf, you need to change that one as well.
Back to top
View user's profile Send private message
eyeswide
n00b
n00b


Joined: 31 Mar 2005
Posts: 12

PostPosted: Wed Jul 06, 2005 2:02 am    Post subject: Reply with quote

Ok great that's does it,
thanks for the help :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum