View previous topic :: View next topic |
Author |
Message |
RangerDude Guru


Joined: 19 Apr 2003 Posts: 301
|
Posted: Thu Oct 30, 2003 10:48 pm Post subject: Disable apache eth listening? |
|
|
How can I make apache only listening on localhost, and no eth's?
It's because my dev server pages shouldn't be reachable from the outside of the local host for security reasons. |
|
Back to top |
|
 |
BitJam Advocate

Joined: 12 Aug 2003 Posts: 2513 Location: Silver City, NM
|
Posted: Thu Oct 30, 2003 11:52 pm Post subject: |
|
|
In your .conf files, where-ever it says "Allow from all" replace this with: Code: | Order deny,allow
Deny from all
allow from 127.0.0.1 |
|
|
Back to top |
|
 |
Chris W l33t


Joined: 25 Jun 2002 Posts: 972 Location: Brisbane, Australia
|
Posted: Fri Oct 31, 2003 12:12 am Post subject: |
|
|
With Bitjam's approach Apache will still accept the TCP connection before deciding it's not allowed to access the pages. The approach also potentially requires edits of all permissions in the configuration.
You can use the Listen directive to stop Apache listening on any interfaces (i.e. ignore) other than the one's you want: Code: | Listen 192.168.1.1:80
Listen 127.0.0.1:80 | where the addresses are those of the interfaces you want to listen on (apache2.conf). This has global effect.
(Example based on Apache 2, may be slightly different under 1.3) _________________ Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein |
|
Back to top |
|
 |
RangerDude Guru


Joined: 19 Apr 2003 Posts: 301
|
Posted: Fri Oct 31, 2003 10:32 am Post subject: |
|
|
Code: | Listen 127.0.0.1:80 |
gives me
Code: | # /etc/init.d/apache2 restart
* Starting apache2...
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[ !! ]
|
|
|
Back to top |
|
 |
|