View previous topic :: View next topic |
Author |
Message |
eyeswide n00b
Joined: 31 Mar 2005 Posts: 12
|
Posted: Tue Jul 05, 2005 12:10 am Post subject: apache2 and BindAddress troubles |
|
|
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 |
|
|
widan Veteran
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Tue Jul 05, 2005 12:14 am Post subject: |
|
|
Replace with Code: | Listen 127.0.0.1:80 | (Remove the BindAddress first, it does not work for Apache 2) |
|
Back to top |
|
|
eyeswide n00b
Joined: 31 Mar 2005 Posts: 12
|
Posted: Tue Jul 05, 2005 12:38 am Post subject: |
|
|
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 |
|
|
widan Veteran
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Tue Jul 05, 2005 4:07 pm Post subject: |
|
|
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 |
|
|
eyeswide n00b
Joined: 31 Mar 2005 Posts: 12
|
Posted: Wed Jul 06, 2005 2:02 am Post subject: |
|
|
Ok great that's does it,
thanks for the help |
|
Back to top |
|
|
|