Solved

Serving more directories under ~user

Posted on 2002-07-07
3
160 Views
Last Modified: 2010-03-04
Using Apache 1.3, I wish to serve directories other than html in a users' home dir.

For example:
www.domain.com/~user will serve what is in /usr/home/user/html
which currently works, but I also want
www.domain.com/~user/reports to serve what is in /usr/home/user/reports
 .. and not have to put reports under html.

I have tried various methods such as putting "UserDir reports" in <IfModule mod_userdir.c> but that obviously cancels out "UserDir html".

Thanks
0
Comment
Question by:cfinniga
3 Comments
 
LVL 15

Accepted Solution

by:
samri earned 50 total points
Comment Utility
cfniga,

Yes, I can confirm that would be true.  Remember that the purpose of UserDir directive is to enable url http://www.domain.com/~user/ to be mapped to some path in userhome directory (by deafult it would be in ~user/public_html/), having a multiple of this would actually cancel out the first declaration.

I would think that you might need mod_rewrite to actually rewrite the requested URL to the mapped to the new url;

Check out the URL rewriting Guide,
http://httpd.apache.org/docs/misc/rewriteguide.html

Another possibilities would be AliasMatch (mod_alias);
http://httpd.apache.org/docs/mod/mod_alias.html#aliasmatch

I'm not sure which would be the best (and simplest).  Perhaps I might need to workout some possible config that works.

Feel free to look at both options.

regards,
0
 
LVL 15

Expert Comment

by:periwinkle
Comment Utility
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area with the following recommendation for this question:

Answered by Samri

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

periwinkle
EE Cleanup Volunteer
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now