Jump to content

Directory visibility


EXiT

Recommended Posts

Is there anyway to turn off my apache server, so other people can't type in my IP and view my directories? I still want it to be visible for me though.I'm sure a few months ago i read that it could be done through the httpd file.But not got a clue what to look for.

 

I don't want to create a blank index file.

 

Cheers

 

... On my localhost i mean

Link to comment
https://forums.phpfreaks.com/topic/100234-directory-visibility/
Share on other sites

Open your httpd.conf file and find the following lines:

# First, we configure the "default" to be a very restrictive set of 
# features.  
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

 

Add the following line before the </Directory> line:

    Allow from 127.0.0.1 localhost

 

Now scroll down a bit further and comment out (add a # at the start of the line) the following lines highlighted in bold:

#

    # Controls who can get stuff from this server.

    #

    Order allow,deny

    Allow from all

 

Save the httpd.conf and restart Apache

 

Apache will only accept connections from you. It'll reject any other users (remote computers)

Link to comment
https://forums.phpfreaks.com/topic/100234-directory-visibility/#findComment-513162
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.