LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-22-2009, 12:23 AM   #1
shak380
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
UserDir Not Allowed Here


Hello all,

I have configured a web server, the details are below..

OS = RedHat Enterprise Linux 5,
web server = httpd ( came with RHEL-5, i have neither updated nor installed a latest version)

What I am trying to do : I am trying to configure my web server like the WHM(cpanel) server. So all the domains Document root will be /home/"username"/www/web/ (a bit different from cPanel server though) and log would be /home/"username"/log/ without the "Users home directory" option in my httpd.conf( since WHM httpd.conf file does not contain that).
Now, I get "UserDir Not Allowed Here" error. Please help me fix this.
I have given my httpd.conf file(I have removed some comment lines and some directives that I thought will be irrelevent) as well as error_log file(Only the error lines) here.....
Quote:
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>

<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

Listen 80
Include conf.d/*.conf
#ExtendedStatus On
User apache
Group apache
ServerAdmin root@localhost
ServerName www.myworks.com:80
UseCanonicalName Off
#DocumentRoot "/var/www/html"
#DocumentRoot "/home/"
#DocumentRoot "/"
UserDir webs
<Directory />
Options ALL
AllowOverride ALL
</Directory>
# This should be changed to whatever you set DocumentRoot to.
#<Directory "/var/www/html">
<Directory "/home/*/www/webs">
MultiViews
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disable

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
#UserDir public_html
UserDir webs

</IfModule>
DirectoryIndex index.html index.html.var
AccessFileName .htaccess
<Files ~ "^\.ht">
Order deny,allow
Allow from all
# Order allow,deny
# Deny from all
Satisfy all
</Files>
TypesConfig /etc/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
# MIMEMagicFile /usr/share/magic.mime
MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
CustomLog logs/access_log combined
ServerSignature On
Alias /icons/ "/var/www/icons/"
<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# WebDAV module configuration section.
<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb
</IfModule>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/var/www/error">
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>
NameVirtualHost 10.0.0.1:80
<VirtualHost 10.0.0.1:80>
ServerAdmin webmaster@name1.myworks.com
DocumentRoot /home/shakir/www/webs/
ServerName myworks.com
ServerAlias www.myworks.com
#<IfModule !mod_disable_suexec.c>
# User shakir
# Group shakir
#</IfModule>
#UserDir disabled
#UserDir enabled shakir
# ErrorLog /home/shakir/www/logs/error_log
# CustomLog /home/shakir/www/logs/custom_log combined
</VirtualHost>
And my error log is :

Quote:
[Fri Mar 20 16:53:00 2009] [alert] [client 10.0.0.1] /home/shakir/.htaccess: UserDir not allowed here
[Fri Mar 20 16:53:01 2009] [alert] [client 10.0.0.1] /home/shakir/.htaccess: UserDir not allowed here
[Sun Mar 22 22:43:49 2009] [alert] [client 10.0.0.1] /home/shakir/.htaccess: UserDir not allowed here
[Sun Mar 22 22:43:49 2009] [alert] [client 10.0.0.1] /home/shakir/.htaccess: UserDir not allowed here

Last edited by shak380; 03-23-2009 at 10:28 PM.
 
Old 03-22-2009, 01:12 PM   #2
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

what does
Code:
apachectl configtest
say to your httpd.conf?
 
Old 03-22-2009, 09:50 PM   #3
shak380
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hi mesiol,

I think "apachectl configtest" and "httpd -t" are equivalent, and they both check the syntax errors( If this is not the case please let me know). Now, I had run "httpd -t" and I got "Syntax OK". Moreover my httpd is running and if I open the page /home/shakir/www/webs/first.php I get a "500 Internal Server Error" message.

Thank you........
 
Old 03-24-2009, 11:59 PM   #4
shak380
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hello All,

I have not yet fixed it.....Any help would be greatly appreciated.

Thanks in advance.

Shakir
 
Old 03-25-2009, 06:12 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You say the home dirs are

/home/"username"/www/web/

but the setting in httpd.conf is

UserDir webs

notice the difference .. ?
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Method Not Allowed: The requested method POST is not allowed for the URL /writedhcp.p WiWa Linux - Networking 15 01-06-2011 01:20 PM
Tracking user logins that was allowed and not allowed eswanepoel Linux - Security 3 08-02-2006 04:37 AM
SlackWare :Method Not Allowed The requested method POST is not allowed for the URL slack31337 Linux - Software 0 04-08-2006 06:09 PM
Apache UserDir Abbaddon Slackware 12 09-15-2004 11:28 AM
UserDir problems paulrayner Linux - Software 2 07-19-2004 12:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:00 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration