Manually adding an entry to httpd.conf for a domain that would share

Manually adding an entry to httpd.conf for a domain that would share

am 24.09.2009 08:52:34 von John Martin

I'd like to add a domain to httpd.conf manually, because it shares a
DocumentRoot with an already existing account. I recently moved
servers, and the old server had Apache 1.3. Using an Include, I added
this to httpd.conf:


ServerAlias domain.com *.domain.com
ServerName domain.com
DocumentRoot /home/account1/public_html
User account1
Group account1


Where account1 was the account for a pre-existing domain added by
cPanel. I also added the appropriate zone for the associated IP, and
everything worked as expected. In the new server which has Apache
2.0.63, I tried the following:


ServerAlias domain.com *.domain.com
ServerName domain.com
DocumentRoot /home/account1/public_html

suPHP_UserGroup account1 account1


SuexecUserGroup account1 account1



However after restarting httpd, I get a 403 Forbidden page for the
domain, so I have made a mistake or missed something. What is the
correct way to replicate what the Apache 1.3 code does, in Apache 2?
That is, adding a domain which shares a DocumentRoot with an existing
domain.

Thanks,
John M.

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Manually adding an entry to httpd.conf for a domain

am 24.09.2009 12:47:09 von Krist van Besien

On Thu, Sep 24, 2009 at 8:52 AM, John Martin wrote:
> I'd like to add a domain to httpd.conf manually, because it shares a
> DocumentRoot with an already existing account.

Manually, as opposed to what?



> However after restarting httpd, I get a 403 Forbidden page for the
> domain, so I have made a mistake or missed something. What is the
> correct way to replicate what the Apache 1.3 code does, in Apache 2?
> That is, adding a domain which shares a DocumentRoot with an existing
> domain.

Let's try to solve your problem...

What is the output of the following command?
httpd -S

What is in your error log?

Do you have the correct NameVirtualHost statement somewhere?

Krist





--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Manually adding an entry to httpd.conf for a domain

am 24.09.2009 21:35:11 von John Martin

> Let's try to solve your problem...
>
> What is the output of the following command?
> httpd -S
>
> What is in your error log?
>
> Do you have the correct NameVirtualHost statement somewhere?
>
> Krist

Thank you for the suggestions - I hadn't checked the Apache error log,
and in that log I found the error:
"(13)Permission denied: /home/account1/public_html/.htaccess
pcfg_openfile: unable to check htaccess file, ensure it is readable"

..htaccess was already readable so I'm not sure what the cause of this
problem was, but after googling it seems this is solved by
reinstalling Frontpage extensions (which I'd uninstalled earlier). I
was then able to uninstall the extensions again and the issue did not
reappear. Strange error.

John

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org