Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an Apache install set up with suExec and vhosts.. The original ("primary") vhost works fine, but I'm having some issues with a second one I've added; returning a 403 response.

Considering this is just a development instance for the same site, I copied everything from the 'siteweb' user to the 'sitedev' user (and set the owner/group correctly, of course), copied the vhost config and corrected the paths.

I'm not really sure what to do at this point, so if anyone can point me in the right direction, that'd be great :)

Relevant stuff

vhost_website.conf--

ServerName website.com
ServerAlias www.website.com shop.website.com
DocumentRoot /home/siteweb/public_html
SuexecUserGroup siteweb siteweb

ScriptAlias /cgi-bin/ /home/siteweb/cgi-bin/
<Directory /home/siteweb/public_html>
    Options -Indexes IncludesNOEXEC FollowSymLinks +ExecCGI
    AddHandler php-fcgi .php
    Action php-fcgi /fcgi-bin/php.fcgi
    FCGIWrapper /home/siteweb/cgi-bin/php.fcgi .php
    Allow from All
    AllowOverride  All
</Directory>
<Directory /home/siteweb/cgi-bin>
  AllowOverride None
  Options ExecCGI
  Allow from all
</Directory>

/home/siteweb/cgi-bin/php.fcgi has the following:

#!/bin/sh
export PHPRC=/home/siteweb/
export PHP_FCGI_MAX_REQUESTS=2000
exec /usr/bin/php-cgi

And as mentioned, all I've done was change 'siteweb' to 'sitedev' in all applicable places, so I'm kind of at a loss as to what could have happened. There's nothing useful in any logs, just a "Permission denied: access to / denied"

Hopefully someone has simply run into this before and knows how to fix it quickly, but please let me know if there's any other relevant information I can provide.

Edit Dev site conf file, in same format as above: vhost_devsite.conf --

<VirtualHost *:80>
  ServerName devsite.website.com
  DocumentRoot /home/sitedev/public_html
  SuexecUserGroup sitedev sitedev

  ScriptAlias /cgi-bin/ /home/sitedev/cgi-bin/
  <Directory /home/sitedev/public_html>
    Options -Indexes IncludesNOEXEC FollowSymLinks +ExecCGI
    AddHandler php-fcgi .php
    Action php-fcgi /fcgi-bin/php.fcgi
    FCGIWrapper /home/sitedev/cgi-bin/php.fcgi .php
    Allow from All
    AllowOverride  All
  </Directory>
  <Directory /home/sitedev/cgi-bin>
    AllowOverride None
    Options ExecCGI
    Allow from all
  </Directory>
</VirtualHost>
share|improve this question
    
What's currently in /home/siteweb/public_html? And are you sure all the directory permissions are correct? –  EightBitTony Jun 29 '11 at 19:08
    
Just noticed, you talk about sitedev as the new vhost but have shown us the siteweb config? –  EightBitTony Jun 29 '11 at 19:17
    
Because the sitedev vhost config is the exact same, except with sitedev in the appropriate directory and Suexec names. I can add it if it'll lend credibility. –  Morgon Jun 29 '11 at 19:28
    
and ls -ld /home/sitedev and ls -ld /home/siteweb? Any .files in /home/sitedev which didn't get hit by a chown? –  EightBitTony Jun 29 '11 at 21:35
    
The root /home/sitedev didn't get the same permissions. Thank you so much. Can you add that last quote as a response, so I can mark it as the answer? –  Morgon Jun 30 '11 at 13:34
show 1 more comment

1 Answer 1

up vote 0 down vote accepted

Check that the permissions on the home directories are correct, using

ls -ld /home/sitedev

and

ls -ld /home/siteweb
share|improve this answer
    
Turns out the base home directory didn't have similar permissions. Thanks for helping me sanity-check! –  Morgon Jun 30 '11 at 20:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.