can subdomains access the main domain's cgi-bin... or is there a way to alias the subdomain address to a specified folder?
This is a discussion on can subdomains access main cgi-bin? in the Shared & Semi-Dedicated forum
can subdomains access the main domain's cgi-bin... or is there a way to alias the subdomain address to a specified folder? ...
can subdomains access the main domain's cgi-bin... or is there a way to alias the subdomain address to a specified folder?
You could do this by accessing the main cgi-bin with an absolute path.
For example if you have the file http://subdomain.maindomain.com/index.html that wants to access the file script.cgi in your main cgi-bin, then reference it like this http://maindomain.com/cgi-bin/script.cgi in index.html instead of this cgi-bin/script.cgi
You can also make a symbolic like (pointer) to the main cgi-bin, but you'll need ssh access to do this:
1. Remove the cgi-bin directory that CP automatically creates for you with
2. Next, create teh sym link:Code:rmdir cgi-bin
Now you have a pointer in your subdomain folder to the cgi-bin directory for your main site. All of the scripts that work from your main site will also work from the subdomain.Code:ln -s ../cgi-bin cgi-bin
--Jason
I just got started here and I've been trying to get support to tell me if subdomains (for multihosting) get their own cgi-bin directory. I take it from this thread that they do.![]()
My DNS changes are still propogating, so I haven't invented any subdomains yet.
Yes, they do. When you create a subdomain, CPanel will automatically create a folder for the subdomain with the same name as you enter for the subdomain (the folder will be called 'yadda' if you create a subdomain called 'yadda.yourdomain.com'). It will also create a cgi-bin subdirectory inside the subdomain directory which is completely separate from the cgi-bin in your public_html.
--Jason
Copyright © 2011 JaguarPC.com
Bookmarks