Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Localhost only for apache?
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
geders
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2002
Posts: 76
Location: Purdue

PostPosted: Thu Apr 24, 2003 2:25 am    Post subject: Localhost only for apache? Reply with quote

I've got a few web-based apps that require apache to be running, but I don't want to broadcast that I am running apache. How do I make it so that it doesn't respond to any requests outside of localhost? And I don't want to install a firewall to do this, just something in commonapache.conf...thanks for any help!
Back to top
View user's profile Send private message
Jeld
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2002
Posts: 84
Location: NYC, US

PostPosted: Thu Apr 24, 2003 5:42 am    Post subject: Reply with quote

In the apache.conf file, find the line that says
Code:
Port 80

and replace it with
Code:
Listen 127.0.0.1:80

restart apache and you are done.
To check that it is only listening on localhost use
Code:
lsof -i -n | grep httpd

_________________
package JAPH;sub x{$/='$';@1=map{$_=ord;$_--;chr}
split//,<DATA>;@2=map{$_=ord;$_++;chr}split//
,<DATA>;$_=sub{$.++%2?shift@2:shift@1};bless$_;}
1;$x=JAPH->x;for(1..25){print&$x,;}__DATA__
Kt!ouf!fmIdf"$ts@ngqOq`jq
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