The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Web Programming, Web 2.0 and Mashups
.
google unix.com



Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
You don't have permission to access / on this server. aneuryzma Web Programming, Web 2.0 and Mashups 9 05-21-2009 02:08 PM
Can a script runned in local server access remote server? luna_soleil Shell Programming and Scripting 3 02-26-2009 05:38 PM
restricting access to a server melanie_pfefer SUN Solaris 1 02-25-2008 02:55 PM
Is it possible to access from a server the database of another server. debu UNIX for Advanced & Expert Users 1 05-20-2007 05:42 PM
Can't access files on own server Djaunl UNIX for Dummies Questions & Answers 3 07-20-2006 10:19 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-22-2009
aneuryzma aneuryzma is offline
Registered User
  
 

Join Date: May 2009
Posts: 60
access to my server is always allowed

Hi,

I can't deny the access to my server. if I visit http://localhost I can always see all the files.
Why ?


Code:
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Deny from All
</Directory>






Code:
<Directory "/Users/aneuryzma/Sites">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks MultiViews

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None
                               
    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Deny from all

</Directory>

thanks
  #2 (permalink)  
Old 05-22-2009
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,655
See the Apache mod_access docs.

Here is a clue:

Code:
SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
<Directory /docroot>
    Order Deny,Allow
    Deny from all
    Allow from env=let_me_in
</Directory>
  #3 (permalink)  
Old 05-22-2009
aneuryzma aneuryzma is offline
Registered User
  
 

Join Date: May 2009
Posts: 60
Hi,

i've modified to

Code:
<Directory "/Users/aneuryzma/Sites">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks MultiViews

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None
                               
    #
    # Controls who can get stuff from this server.
    #
    Order Deny,Allow
    Deny from all
    Allow from env=let_me_in

</Directory>
but still everything is accessible.

I've also tried

Code:
Order Deny,Allow
Deny from All
and

Code:
Order Deny,Allow
I'm sure the directory path is correct, because the indexing works properly.
  #4 (permalink)  
Old 05-22-2009
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,655
Did you restart apache after each configuration change?
  #5 (permalink)  
Old 05-22-2009
aneuryzma aneuryzma is offline
Registered User
  
 

Join Date: May 2009
Posts: 60
yes!

sudo apachectl -k restart

and refreshed firefox cache
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:55 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0