dravenlon

Member
Jan 11, 2007
17
0
151
IL, USA
First off I would like to say I am pretty new to linux, WHM/CPanel, and updating apache.

Now that is said, here is what I did...


I went into WHM and updating it to Edge, then I went and clicked "Apache Update" and updated from 1.3.37 to 2.2.3 with gd+freetype support. What a mistake this was! :D

I ended up getting the following while PHP 5 was compiling...

Code:
Error: postcheck() returned a failed status
Restoring previously working apache
and of course, my httpd kept failing, all day. So I ended up backing up the /usr/local/apache directory and deleted it and then I ran /scripts/easyapache to start over. When I start httpd I get...

Code:
[Thu Jan 11 01:36:46 2007] [warn] VirtualHost 216.32.88.234:0 overlaps with VirtualHost 216.32.88.234:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Jan 11 01:36:46 2007] [warn] VirtualHost 216.32.88.234:0 overlaps with VirtualHost 216.32.88.234:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Jan 11 01:36:46 2007] [warn] VirtualHost 66.199.235.170:0 overlaps with VirtualHost 66.199.235.170:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Jan 11 01:36:46 2007] [warn] VirtualHost 66.199.235.170:0 overlaps with VirtualHost 66.199.235.170:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Jan 11 01:36:46 2007] [warn] VirtualHost 216.32.88.234:0 overlaps with VirtualHost 216.32.88.234:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Jan 11 01:36:46 2007] [warn] VirtualHost 66.199.235.170:0 overlaps with VirtualHost 66.199.235.170:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Jan 11 01:36:46 2007] [warn] VirtualHost 216.32.88.234:0 overlaps with VirtualHost 216.32.88.234:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Jan 11 01:36:46 2007] [warn] VirtualHost 216.32.88.234:0 overlaps with VirtualHost 216.32.88.234:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Jan 11 01:36:46 2007] [warn] VirtualHost 216.32.88.234:0 overlaps with VirtualHost 216.32.88.234:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Jan 11 01:36:46 2007] [warn] VirtualHost 66.199.235.170:0 overlaps with VirtualHost 66.199.235.170:0, the first has precedence, perhaps you need a NameVirtualHost directive
and all my sites have a 403 Forbidden error now. And for some reason I have a /usr/local/apache directory AND a /usr/local/apache2_2 directory after I ran /scripts/easyapache

If I comment out all the VirtualHosts at the end of httpd.conf then I no longer get the "warnings" above. However, I don't think they are supposed to be commented :) And my sites still get a 403 Forbidden error

Any help would be much appreciated. thank you
 
Last edited:

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
As for the 403 errors, check the owner/group and permissions of a user's /home/user/public_html directory. If the Apache user (nobody) cannot read that directory, then you would have the 403 errors. That's actually a problem with the current EDGE build when you have FrontPage extensions enabled, but you might experience it in other circumstances.

As for the apache2_2 and apache directories, that is how the new easyapache functions. Which version of apache you build is placed into /usr/local/apacheM_M and the appropriate files are copied (or symlinked for some directoies) to /usr/local/apache

If you still have a backup httpd.conf that worked previosuly, try copying it to /usr/local/apache/conf/
 

dravenlon

Member
Jan 11, 2007
17
0
151
IL, USA
okay thank you. Now, what should the permissions, group/owner be?


I did...

Code:
chmod 755 /home
chmod 755 /home/user
chown nobody:nobody /home
chown nobody:nobody /home/user
that correct?
 
Last edited:

mOdY

Well-Known Member
Dec 25, 2004
80
0
156
If i understand cpanelkenneth right, then i think this would fix your problem in a shake of a lamb's tail :)


#!/bin/bash
cd /var/cpanel/users
for user in *
do
chown $user:nobody ""/home"/"$user"/public_html/"
done

#end#


Steps:-
1. Paste the bash script above in a new file.
2. chmod 700 filename.sh
3. ./filename.sh
-- assuming that filename.sh if the file you pasted the script in.
 

dravenlon

Member
Jan 11, 2007
17
0
151
IL, USA
If i understand cpanelkenneth right, then i think this would fix your problem in a shake of a lamb's tail :)


#!/bin/bash
cd /var/cpanel/users
for user in *
do
chown $user:nobody ""/home"/"$user"/public_html/"
done

#end#


Steps:-
1. Paste the bash script above in a new file.
2. chmod 700 filename.sh
3. ./filename.sh
-- assuming that filename.sh if the file you pasted the script in.


I made filename.sh in the / directory and ran it. it didn't fix the problem. my site is http://www.landofnevard.com
 

mickalo

Well-Known Member
Apr 16, 2002
782
5
318
N.W. Iowa
Still didn't work.. the commands I did are...

Code:
chmod 750 /home/user/public_html
chown nobody:nobody /home/user/public_html
that should be chmod 0750

and the chown should be the username:nobody
where the "username" is replaced by the actual account's username IE: fred:nobody if the username is fred

Mickalo
 

mickalo

Well-Known Member
Apr 16, 2002
782
5
318
N.W. Iowa
still not working :(

Code:
[email protected] [/usr/local]# chmod 0750 /home/user/public_html/
[email protected] [/usr/local]# chown user:nobody /home/user/public_html/
Ok, the problem is probably the trailing slash on your path, try removing the trailing slash at the end of the public_html/ <= (remove this slash), then run your commands again and see if this corrects it.

Mickalo
 

dravenlon

Member
Jan 11, 2007
17
0
151
IL, USA
Ok, the problem is probably the trailing slash on your path, try removing the trailing slash at the end of the public_html/ <= (remove this slash), then run your commands again and see if this corrects it.

Mickalo
nope. It is something that the Edge apache script did. When I go back to Current WHM and run /scripts/easyapache it just tells me that httpd won't start
 

dravenlon

Member
Jan 11, 2007
17
0
151
IL, USA
/home/ directory...
Code:
8 drwx--x--x   21 nobody nobody  4096 Jan 12 19:59 home/
User directory...
Code:
4 drwx--x--x  41 user user 4096 Jan 12 20:03 user/
public_html directory..

Code:
12 drwxr-x---  13 user nobody        12288 Jan 10 01:32 public_html/
 

dravenlon

Member
Jan 11, 2007
17
0
151
IL, USA
this is in /usr/local/apache/logs/error_log...

Code:
[Fri Jan 12 21:44:38 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/apache/htdocs/
[Fri Jan 12 21:44:38 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/apache/htdocs/403.shtml
[Fri Jan 12 21:44:41 2007] [error] [client 206.192.51.209] client denied by server configuration: /home/user/public_html/
[Fri Jan 12 21:44:41 2007] [error] [client 206.192.51.209] (13)Permission denied: access to /403.shtml denied
[Fri Jan 12 21:44:51 2007] [error] [client 69.221.56.14] client denied by server configuration: /home/user2/public_html/
[Fri Jan 12 21:44:51 2007] [error] [client 69.221.56.14] (13)Permission denied: access to /403.shtml denied
[Fri Jan 12 21:44:52 2007] [error] [client 69.221.56.14] client denied by server configuration: /home/user2/public_html/
[Fri Jan 12 21:44:52 2007] [error] [client 69.221.56.14] (13)Permission denied: access to /403.shtml denied
[Fri Jan 12 21:45:01 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/apache/htdocs/whm-server-status
[Fri Jan 12 21:45:01 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/apache/htdocs/403.shtml
[Fri Jan 12 21:45:03 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/apache/htdocs/whm-server-status
[Fri Jan 12 21:45:03 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/apache/htdocs/403.shtml
[Fri Jan 12 21:45:03 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/apache/htdocs/whm-server-status
[Fri Jan 12 21:45:03 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/apache/htdocs/403.shtml
[Fri Jan 12 21:45:03 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/apache/htdocs/whm-server-status
[Fri Jan 12 21:45:03 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/apache/htdocs/403.shtml
[Fri Jan 12 21:45:11 2007] [error] [client 69.221.56.14] client denied by server configuration: /home/user2/public_html/
[Fri Jan 12 21:45:11 2007] [error] [client 69.221.56.14] (13)Permission denied: access to /403.shtml denied
[Fri Jan 12 21:45:11 2007] [error] [client 69.221.56.14] client denied by server configuration: /home/user2/public_html/
[Fri Jan 12 21:45:11 2007] [error] [client 69.221.56.14] (13)Permission denied: access to /403.shtml denied
 

linux-image

Well-Known Member
Jun 8, 2004
1,190
1
168
India
cPanel Access Level
Root Administrator
The problem is this at /usr/local/apache/conf/httpd.conf

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>


Change this to :

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>

Then; restart apache.
 

gammahelixx

Member
Sep 1, 2004
6
0
151
When this problem happened to me, it was because easyapache put in:

Code:
Group daemon
in /usr/local/apache/conf/httpd.conf

I just replaced it with

Code:
Group nobody
and was good to go.
 

Miss Jacky

Well-Known Member
Mar 4, 2004
91
0
156
Thanks gammahelixx, that looks like the best sollution and fixed this and another thing for me too.

Anyone an idea why easyapache does this? In my httpd.conf it said
Code:
Group #-1
I fixed mine by adding the 'Group nobody' line into the pre-virtual hosts include, so it will not be overwritten.

(CentOS 5, apache 2, easyapache 3)