Apache Aliases On Windows 7

5,440

Surely the line:

Deny from all

is causing your problems. Drop that line and see if it works. What were you trying to do with the Deny from all? Typically the root directory has the strict Deny from all, and all the Alias have a more relaxed access. So for example:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "C:/Users/IssamTP/Documents/NetBeansProjects/TamasMobile/">
    Order allow,deny
    Allow from all
</Directory>
Share:
5,440
IssamTP
Author by

IssamTP

Quick Bio I graduated in early 2010 in Computer Science and Automation at Politecnico delle Marche, with thesis about computer networks security. My professional career started as webmaster/sysadmin in a small web services company (~1 year), then I moved to world of programming as iPhone developer (~1year) then in a medium industry. Currently I work as software engineer for a software house inside a big company.

Updated on September 17, 2022

Comments

  • IssamTP
    IssamTP almost 2 years

    Well, hi everybody. I'm trying to make aliases working on Apache & Windows 7. So, this is what I have:

    <IfModule alias_module>
    Alias /TamasMobile/ "C:/Users/IssamTP/Documents/NetBeansProjects/TamasMobile/"
    </IfModule>
    <Directory "C:/Users/IssamTP/Documents/NetBeansProjects/TamasMobile/">
    Options Indexes FollowSymLinks
    DirectoryIndex index.html index.php
    AllowOverride None
    Order deny,allow
    Deny from all
    </Directory>
    

    Loading website, leads to this error:

    403 Forbidden
    You don't have permission to access /TamasMobile/ on this server.
    

    While the Apache Error log says:

    [Tue Sep 07 00:49:29 2010] [error] [client 127.0.0.1] client denied by server configuration: C:/Users/IssamTP/Documents/NetBeansProjects/TamasMobile/
    

    Yep, I can change the working directory to: ./htdocs/TamasMobile/ or do something similar, but I'd like to know how to fix this just for personal interest.

    Thank you very much folks.

  • IssamTP
    IssamTP almost 14 years
    Thank you! I guess that I should learn to read the documentation in a better way, even if the Apache one is not very clear...