Re: Error in accessing the home page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/29/2012 3:10 PM, Alex Chen wrote:
I downloaded the Apache 2.2.22 Windows msi and installed it as a console app,  I copied all the files to C:/Program Files/Apache and uninstalled Apache to have a stock copy of the installation.
I made the following changes in httpd.conf.

ServerRoot  "C:/Program Files/Apache"
Listen 8080
LoadModule ssl_module modules/mod_ssl.so
DocumentRoot "htdocs"
ErrorLog "logs/error.log"

<Directory "htdocs">
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>

When I used IE to access http://localhost:8080, I got the following error:
Forbidden

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

Apache/2.2.22 (Win32) mod_ssl/2.2.22 OpenSSL/1.0.1c Server at localhost Port 8080

I saw the following entry in error.log
[Thu Nov 29 14:15:39 2012] [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache/htdocs/

However if I changed the directory setting to the followings, it worked fine even though the DocumentRoot setting remained the same.

<Directory "C:/Program Files/Apache/htdocs">
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>

It seems that the DocumentRoot directive accepts a relative path name but the <Directory> structure requires the full path, is that the case?

Alex

This directive sets the directory from which httpd will serve files. Unless matched by a directive like Alias, the server appends the path from the requested URL to the document root to make the path to the document. Example:

DocumentRoot /usr/web

then an access to http://www.my.host.com/index.html refers to /usr/web/index.html. If the directory-path is not absolute then it is assumed to be relative to the ServerRoot.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux