LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 09-05-2007, 11:03 AM   #1
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 889

Rep: Reputation: 45
Apache DocumentRoot UserDir problem


I've seen other have similar problems getting user directories working. I'm seeing something a bit different than others have described, though, so here goes:

The Apache server version is 2.2.0 and was installed as part of the distribution (SuSE 10.x). I've previously had my main web server document tree located under /home/httpd/html so I changed DocumentRoot to point to that. I went into the configuration and disabled the UserDir record that read "UserDir disable root". There was already a record that read "UserDir public_html" that I left alone.

When any attempt to access a user's public_html directory using the normal "http://myhost.mydomain/~username/" URL, what I get in the log files is a message reading:

Code:
File does not exist: /home/httpd/html/~username
Well of course it doesn't exist. Apache is supposed to be -- according to the documentation on the Apache web site -- looking up username's home directory and appending the setting for Userdir. Not just tacking UserDir onto the end of DocumentRoot.

Is there some new Apache module that needs to be loaded/enabled to make UserDir work as before? If so, this is a major change to Apache. Otherwise, this is starting to look like a snafu on the part of the SuSE packagers.

Now there's some mention in the configuration file of the UserDir directive being used in virtual host configurations. I sure hope that this is not mandatory as I have no access to DNS configurations on the network and getting additional IP addresses is like pulling teeth (w/o anesthetic).

Aside: I never had this problem when I built my web servers, PHP, etc. from sources. That practice is, unfortunately, no longer practical since the darned distribution installers insist on installing their copy of Apache (or PHP, or whatever) or else you'll have unresolved dependencies all over the place.

Any help in resolving this would be greatly appreciated.

TIA...
 
Old 09-06-2007, 08:06 PM   #2
davesmith
Member
 
Registered: Sep 2007
Location: Near Dallas, TX
Distribution: Debain and Ubuntu
Posts: 35

Rep: Reputation: 15
http://httpd.apache.org/docs/2.2/howto/public_html.html should be a good start.

Check that the mod_userdir is loaded in your configuration. If it is, not sure what the next step is...

Let us know how it turns out.
 
Old 09-06-2007, 09:27 PM   #3
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 889

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by davesmith View Post
http://httpd.apache.org/docs/2.2/howto/public_html.html should be a good start.

Check that the mod_userdir is loaded
I've been to that page and the settings of UserDir appears as shown in that tutorial. I will check the loaded modules on that system and see if mod_userdir is even getting loaded. I'm doubting that it is. I just checked on another system -- running 2.2.3 -- and mod_userdir was not being loaded. I had to be add it to /etc/sysconfig/apache2 (in APACHE_MODULES="module1 module2 ..."). I expect the same change will have to be made on the system where I originally had the trouble.

I would have expected a change this significant to have been part of 2.0.x. Probably some ugly security hole needed to get fixed before the next major version number change. Oh well, I can appreciate that. Wonder what else changed? Looks like I got some more readin' to do.

Good catch, though. Thanks.

--
Rick
 
Old 09-07-2007, 04:20 PM   #4
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 889

Original Poster
Rep: Reputation: 45
Well... got one Apache installation fixed...

... just not the one that I originally posted about. That one doesn't seem to be loading the module. But, when I add it to the list of desired modules in /etc/sysconfig/apache2, I get a syntax warning from apache2ctl that the userdir module is already loaded. I'm not sure why it thinks that that module is already loaded since the user directories are still not accessible by using the "http://site/~user/" URLs. Apparently, there is/was something different between the two systems. Maybe the changelogs from 2.2.0 -> 2.2.1 -> 2.2.2 -> 2.2.3 will reveal something but I'm thinking more along the lines of the 2.2.0 default config files being, um, screwy.

So, it's not there yet.
 
Old 09-07-2007, 06:42 PM   #5
davesmith
Member
 
Registered: Sep 2007
Location: Near Dallas, TX
Distribution: Debain and Ubuntu
Posts: 35

Rep: Reputation: 15
In the other server, is the UserDir directive in the global configuration, or is it in a virtual host like the one you're trying to get working? Could it be something along those lines?
 
Old 09-07-2007, 06:45 PM   #6
davesmith
Member
 
Registered: Sep 2007
Location: Near Dallas, TX
Distribution: Debain and Ubuntu
Posts: 35

Rep: Reputation: 15
Looking across a few other posts here, you don't have SELinux running do you? Actually that would result in a permissions denied problem, not the problem you're having of it not resolving to the user's public_html folder... would it?
 
Old 09-10-2007, 08:30 PM   #7
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 889

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by davesmith View Post
In the other server, is the UserDir directive in the global configuration
On the system with a working UserDir parameter, it's in "default-server.conf".
Quote:
...or is it in a virtual host like the one you're trying to get working?
Neither system is using virtual hosts. Yet. The one that I got working usually does have some virtual hosts defined on it that I use for testing. But, even in those, I normally just leave UserDir defined globally to "public_html". The system on which I haven't been able to get UserDir to work will likely never have virtual hosts defined.

I don't think I mentioned it when I reported the error message about the module already being loaded, but it doesn't appear that any modules actually loaded. I've tried
Code:
apache2ctl -t -D DUMP_MODULES
and it returns nothing. Well, OK, it returns that error message about the "userdir" module already being loaded or something like that but no list of modules. (I can post the exact message tomorrow. Hopefully, the firefighting will be at a minimum and I can look into this over lunch. )

'Tis a puzzlement, this one.

--
Rick
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_speling Apache 2.2 in userdir problem avallach Linux - Networking 0 01-29-2007 03:58 AM
Apache UserDir Problem sbb Linux - Software 13 04-10-2006 06:29 PM
Apache DocumentRoot problem elliottsb Linux - Software 6 02-24-2005 09:40 PM
apache UserDir public_html problem aeshley Linux - Newbie 4 11-29-2004 01:58 AM
apache UserDir public_html problem aeshley Linux - Networking 4 01-17-2002 03:43 PM


All times are GMT -5. The time now is 02:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration