Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Switched hosting recently (Linux, CPanel, WHM). At the old host, there was a subdomain that had a file (instead of a directory) as a root. The file was a CGI script. The said subdomain was created via CPanel by me a while ago.

At the new host, I'm trying to recreate this subdomain. And I get the following error:

The directory, /home/(...)/cgi-bin/guest.cgi could not be created.

Is there a tweak somewhere that enables this functionality?

EDIT: tried to repeat the trick on the old site, and I could not. CPanel update broke it, maybe?

share|improve this question

closed as off-topic by HopelessN00b, Jenny D, kasperd, HBruijn Feb 26 at 15:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Perhaps you had an .htaccess on the subdomain created that leads the user to guest.cgi with a internal redirect ?

AFAIK cpanel subdomain will create the subdomain folder, so for example:

Our domain will be and our subdomain will be test

cPanel will create the subdomain for you and a default structure folder at the root of /home/

Now you make a simple .htaccess file inside test with the follow content:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/guest.cgi$
RewriteRule . cgi-bin/guest.cgi [L]

The above file will redirect any request made to to be redirected to cgi-bin/guest.cgi !

Perhaps you had something like this on your subdomain... you can use a simple redirect in php aswell if you wish, make a index.php on the with the content:

Header( "Location:" );
share|improve this answer
I just checked .htaccess in the cgi-bin folder - it was not like this. But then again, it could've been implemented via upper-level Apache configs. I don't have root rights on that box. – Seva Alekseyev Oct 7 '10 at 20:46
@Seva it is not inside cgi-bin that the .htaccess should be but inside the root folder. – Prix Oct 7 '10 at 23:13
it could be anywhere up the tree to the root or in the /etc configs. – pjz Oct 8 '10 at 0:57
@pjz cgi-bin folders usually have httpd.conf rules which may get overwritten so it would not work and ALSO he wants the root to get to so if that .htaccess is inside the cgi-bin forlder it would never work. – Prix Oct 8 '10 at 3:12

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