user_dir not working

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

user_dir not working

Postby barbu » 03. April 2006 08:59

Hello, I just aquired XAMPP for WinXP few days ago and I'm still in configuration process. Actually I'm quite familiar with Apache configuration under linux, but seems like the WinXP version requires more attention.

I've been trying to run the user_dir module uncommenting the appropriate line in the httpd.conf... althought apache is not starting after such a modification in the conf, and I dont get any error log neither...

Anybody got an idea ?
barbu
 
Posts: 1
Joined: 03. April 2006 08:46

Postby Wiedmann » 03. April 2006 09:34

althought apache is not starting after such a modification in the conf,

Why not?

and I dont get any error log neither...

IMHO not possible.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby capitalfellow » 16. May 2006 23:53

I'm going to hijack this thread because I'm in the same situation. I'm familiar with Apache on *nix (Linux, Solaris, OS X) but I'm less familiar with Windows.

I'm using XAMPP for Windows 1.5.2 In C:\xampp\xampp\apache\conf\httpd.conf I've uncommented line 123:

LoadModule userdir_module modules/mod_userdir.so

and Line 494:

Include conf/extra/httpd-userdir.conf

That file looks like this:
<IfModule userdir_module>
UserDir "My Documents/My Sites"
<Directory "C:/Documents and Settings/*/My Documents/My Sites">
AllowOverride AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
Order Deny,Allow
Allow from all
</Directory>
</IfModule>

After I stop and start apache and request:

http://localhost/~someuser/

I'm presented with 403 error in the browser and in C:\xampp\xampp\apache\logs\error.log is:

[Tue May 16 18:38:30 2006] [error] [client 127.0.0.1] client denied by server configuration: C:/Documents and Settings/someuser/My Documents/My Sites

What else do I need to do?
User avatar
capitalfellow
 
Posts: 60
Joined: 19. July 2005 01:10
Location: Charlotte, NC USA
Operating System: OS X

Postby Wiedmann » 17. May 2006 00:03

I'm familiar with Apache on *nix (Linux, Solaris, OS X) but I'm less familiar with Windows.

There is no big difference between *nix and Windows...


C:/Documents and Settings/someuser/My Documents/My Sites

This path exists?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby WorldDrknss » 17. May 2006 08:06

Wiedmann found an error in the original httpd-userdir.conf, if it has not already be fixed in the beta release.

It shows:
Code: Select all
 <IfModule userdir_module>
    #
    # UserDir: The name of the directory that is appended onto a user's home
    # directory if a ~user request is received.  Note that you must also set
    # the default access control for these directories, as in the example below.
    #
    UserDir "My Documents/My Website"

    #
    # Control access to UserDir directories.  The following is an example
    # for a site where these directories are restricted to read-only.
    #
    <Directory C:/Documents and Settings/*/"My Documents/My Website">
        AllowOverride FileInfo AuthConfig Limit Indexes
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        <Limit GET POST OPTIONS>
            Order allow,deny
            Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS>
            Order deny,allow
            Deny from all
        </LimitExcept>
    </Directory>
</IfModule>

In which it should be:
Code: Select all
<IfModule userdir_module>
    #
    # UserDir: The name of the directory that is appended onto a user's home
    # directory if a ~user request is received.  Note that you must also set
    # the default access control for these directories, as in the example below.
    #
    UserDir "My Documents/My Website"

    #
    # Control access to UserDir directories.  The following is an example
    # for a site where these directories are restricted to read-only.
    #
    <Directory "C:/Documents and Settings/*/My Documents/My Website">
        AllowOverride FileInfo AuthConfig Limit Indexes
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        <Limit GET POST OPTIONS>
            Order allow,deny
            Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS>
            Order deny,allow
            Deny from all
        </LimitExcept>
    </Directory>
</IfModule>
http://wdguides.org - XAMPP Tutorials & MORE!!!!
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby capitalfellow » 18. May 2006 21:45

My content is actually stored on H:\My Doocuments\My Sites

I've figured out that whatever value is in UserDir apache will look for it under

C:/Documents and Settings/username/

and since my H: is not being mounted at C:/Documents and Settings/username/My Documents Apache is not finding the content.

So this is what I'm trying. I created a shortcut called My Sites in C:/Documents and Settings/username/My Documents that points to H:\My Documents\My Sites

my httpd-userdir.conf looks like this now:

<IfModule userdir_module>

UserDir "My Documents/My Sites"

<Directory "C:/Documents and Settings/selundgr/My Documents">
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Order Deny,Allow
Allow from all
</Directory>

<Directory "H:/My Documents/My Sites">
AllowOverride AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
Order Deny,Allow
Allow from all
</Directory>
</IfModule>

and now I have the error

[Thu May 18 16:43:31 2006] [error] [client 127.0.0.1] Negotiation: discovered file(s) matching request: C:/Documents and Settings/username/My Documents/My Sites (None could be negotiated).

i don't understand what this error is telling me
User avatar
capitalfellow
 
Posts: 60
Joined: 19. July 2005 01:10
Location: Charlotte, NC USA
Operating System: OS X

Postby WorldDrknss » 19. May 2006 07:45

Try:

Alias "/My Sites/" "H:/My Documents/*/My Sites/"
<IfModule userdir_module>
UserDir "My Documents/My Sites"
<Directory "H:/My Documents/*/My Sites">
AllowOverride AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
Order Deny,Allow
Allow from all
</Directory>
</IfModule>

The *'s get replaced by a user, so if you have a user name Bob then the path would read H:/My Documents/Bob/My Sites/
http://wdguides.org - XAMPP Tutorials & MORE!!!!
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby capitalfellow » 19. May 2006 16:42

I don't think this is going to work because:

Alias "/My Sites/" "H:/My Documents/*/My Sites/"

Would alias the H:/ directory to the URL: http://localhost/My%20/Sites/

What I want is to access my content at H:/ from the URL: http://localhost/~username
User avatar
capitalfellow
 
Posts: 60
Joined: 19. July 2005 01:10
Location: Charlotte, NC USA
Operating System: OS X

Solved

Postby capitalfellow » 19. May 2006 16:55

Thank you to everyone's help and suggestions. They helped me realize what needed to be done.

The UserDir directive automatically adds the username to the path it looks. I had to create a directory with the name of my username under H:\My Documents\My Sites

My H:\ data is mounted automatically when I log in and unmounted when i log out such that if another user logged in their data would be mounted at H:\

This httpd-userdir.conf worked:

<IfModule userdir_module>

UserDir "H:/My Documents/My Sites"

<Directory "H:/My Documents/My Sites/*">
AllowOverride AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
Order Deny,Allow
Allow from all
</Directory>
</IfModule>
User avatar
capitalfellow
 
Posts: 60
Joined: 19. July 2005 01:10
Location: Charlotte, NC USA
Operating System: OS X

Postby jabberwock » 03. October 2006 00:11

i have a similar problem with the linux one, Forbidden
You don't have permission to access /~jabberwock/ on this server.

i have the userdir mod enabled, but i can't access /~usernames/
jabberwock
 
Posts: 3
Joined: 03. October 2006 00:05

Postby capitalfellow » 03. October 2006 06:22

Then you need to go ask for help on XAMPP for Linux. The reason each distribution for an OS has its own topic is so people that most understand the OS can help you.
User avatar
capitalfellow
 
Posts: 60
Joined: 19. July 2005 01:10
Location: Charlotte, NC USA
Operating System: OS X


Return to XAMPP for Windows

Who is online

Users browsing this forum: JJ_Tagy and 39 guests