How to change DocumentRoot

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to change DocumentRoot

Postby graphicsRat » 19. August 2006 02:25

Hello,

I'm having trouble resetting the DocumentRoot from "C:/Program Files/xampp/htdocs" to "E:\IMF". I've edited the httpd.conf file (in C:\Program Files\xampp\apache\conf) as follows:

Code: Select all
#DocumentRoot "C:/Program Files/xampp/htdocs"
DocumentRoot "E:/IMF"
...
#
# This should be changed to whatever you set DocumentRoot to.
#
#<Directory "C:/Program Files/xampp/htdocs">
<Directory "E:/IMF">



Upon which I restarted the server, and tried visting http://localhost, I go the message:

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
...
Error 403

Please help,

Thanks.
graphicsRat
 
Posts: 14
Joined: 18. August 2006 03:26

Re: How to change DocumentRoot

Postby Izzy » 19. August 2006 02:38

graphicsRat wrote:...You don't have permission to access the requested directory. There is either no index document or the directory is read-protected...

Is all this intact:
Code: Select all
<Directory "E:/IMF">
    #
    # 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 Includes ExecCGI
   
    #
    # 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 All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

Do you have an index file in E:\IMF?
index.html etc.
Last edited by Izzy on 27. August 2006 00:57, edited 4 times in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: How to change DocumentRoot

Postby graphicsRat » 19. August 2006 02:52

Izzy wrote:Is all this intact:
Code: Select all
<Directory "E:/IMF">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI
    # Controls who can get stuff from this server.
    #
    ...
    Order allow,deny
    Allow from all

</Directory>

Do you have an index file in E:\IMF?
index.html etc.
...


Yes it is intact, and I do have an index.htm file in E:\IMF.

If it helps, here are the last few lines of the error log file error.log:

Code: Select all
...
[Sat Aug 19 02:41:11 2006] [error] [client 123.45.67.89] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 02:41:11 2006] [error] [client 123.45.67.89] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 02:41:11 2006] [error] [client 123.45.67.89] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 02:41:11 2006] [error] [client 123.45.67.89] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 02:41:11 2006] [error] [client 123.45.67.89] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 02:41:11 2006] [error] [client 123.45.67.89] (OS 5)Access is denied.  : Cannot map GET /favicon.ico HTTP/1.1 to file
[Sat Aug 19 02:41:17 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 02:41:17 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 02:41:17 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 02:41:17 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
...
graphicsRat
 
Posts: 14
Joined: 18. August 2006 03:26

Postby Izzy » 19. August 2006 03:11

You did restart Apache after editing the httpd.conf?

At a command prompt in xampp/apache/bin issue
apache -t

Paste the results please.

Also at the command prompt type:
dir E:\IMF

What do you get?
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby graphicsRat » 19. August 2006 18:09

Izzy wrote:You did restart Apache after editing the httpd.conf?

Yes
Izzy wrote:At a command prompt in xampp/apache/bin issue
apache -t

Paste the results please.

I got: Syntax OK

Izzy wrote:Also at the command prompt type:
dir E:\IMF

What do you get?


I got:
Code: Select all
...
08/09/2006  12:44a                 412 footer.htm
08/04/2005  12:00a                 714 footnote.htm
08/16/2006  02:10a                 310 header.htm
08/18/2006  02:46a               2,032 home.htm
08/18/2006  02:41a               2,028 home_1.htm
08/11/2006  03:24a               3,074 index.htm
08/16/2006  01:44a               2,362 menu.htm
08/11/2006  03:26a               4,217 menuScript.js
08/11/2006  01:56a               1,374 menuStyle.css
...
graphicsRat
 
Posts: 14
Joined: 18. August 2006 03:26

Postby Wiedmann » 19. August 2006 18:30

<Directory "E:/IMF">
Code: Select all
(OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file

What is "E:":
- a partition
- a drive mapping


- what's about the the ACLs for this directory?
- what is the Apache user?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby graphicsRat » 19. August 2006 18:38

Wiedmann wrote:What is "E:":


A partition

Wiedmann wrote:- what's about the the ACLs for this directory?
- what is the Apache user?


The drive is an NTFS partition and to which only the Administrator has access to. Do you think that's the problem? Should I add other user's? if so, which?
graphicsRat
 
Posts: 14
Joined: 18. August 2006 03:26

Postby Wiedmann » 19. August 2006 18:41

... only the Administrator has access to. Should I add other user's? if so, which?

If you start Apache as service, at least SYSTEM must have access too.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby graphicsRat » 19. August 2006 18:55

SYSTEM now has read and execute permissions, and I've restarted Apache, but I'm still getting the error:

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
...
Error 403

Excerpt of error.log:

Code: Select all
[Sat Aug 19 18:53:55 2006] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sat Aug 19 18:53:55 2006] [notice] Child 356: Exit event signaled. Child process is ending.
[Sat Aug 19 18:53:56 2006] [notice] Child 356: Released the start mutex
[Sat Aug 19 18:53:57 2006] [notice] Child 356: Waiting for 250 worker threads to exit.
[Sat Aug 19 18:53:57 2006] [notice] Child 356: All worker threads have exited.
[Sat Aug 19 18:53:57 2006] [notice] Child 356: Child process is exiting
[Sat Aug 19 18:53:58 2006] [notice] Parent: Child process exited successfully.
[Sat Aug 19 18:54:14 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Sat Aug 19 18:54:14 2006] [notice] Server built: Dec  1 2005 18:36:53
[Sat Aug 19 18:54:14 2006] [notice] Parent: Created child process 1412
[Sat Aug 19 18:54:21 2006] [notice] Child 1412: Child process is running
[Sat Aug 19 18:54:22 2006] [notice] Child 1412: Acquired the start mutex.
[Sat Aug 19 18:54:22 2006] [notice] Child 1412: Starting 250 worker threads.
[Sat Aug 19 18:54:22 2006] [notice] Child 1412: Starting thread to listen on port 443.
[Sat Aug 19 18:54:22 2006] [notice] Child 1412: Starting thread to listen on port 27015.
[Sat Aug 19 18:54:22 2006] [notice] Child 1412: Starting thread to listen on port 80.
[Sat Aug 19 18:54:22 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 18:54:23 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 18:54:23 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 18:54:23 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 18:54:23 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 18:54:23 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 18:54:23 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 18:54:23 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Aug 19 18:54:23 2006] [error] [client 127.0.0.1] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
graphicsRat
 
Posts: 14
Joined: 18. August 2006 03:26

Postby graphicsRat » 19. August 2006 21:03

I've reset DocumentRoot to "C:/Program Files/xampp/htdocs", and I can now see the XAMPP default page.

How can I change the DocumentRoot? Can anyone help?
graphicsRat
 
Posts: 14
Joined: 18. August 2006 03:26

Postby graphicsRat » 19. August 2006 21:25

I've gone a step further and uninstalled the previous installation (version 1.5.1) from C:/Program Files/xampp/, and installed the latest version (1.5.3a) to E:\xampp.

Result: default (welcome) page loads well. But when I change document root to "E:\IMF", I get the same old access forbidden error :(

Whyyyyyyyyyyy ... Image
graphicsRat
 
Posts: 14
Joined: 18. August 2006 03:26

Postby graphicsRat » 19. August 2006 21:31

SUCCESS!!! :D

The problem access permissions were not propagated to the E:\IMF subdirectory from the top level E, so I explicitly gave SYSTEM permission to the E:\IMF directory, and now I can see my homepage. Woo-hoo!
graphicsRat
 
Posts: 14
Joined: 18. August 2006 03:26

Postby burgermeister » 21. August 2006 04:37

I am having the same problem you had, except that I'm using D partitioned drive. I tried to give system full control and I didn't get any results but 403
burgermeister
 
Posts: 8
Joined: 18. July 2006 19:22

Postby Izzy » 21. August 2006 05:59

burgermeister wrote:I am having the same problem you had, except that I'm using D partitioned drive. I tried to give system full control and I didn't get any results but 403

I have posted a fix for your particular 403 access denied issue which can be found in your other post:

http://community.apachefriends.org/f/viewtopic.php?t=19799
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 136 guests