Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 5 of 5

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? ...

  1. #1
    JPC Member
    Join Date
    Jan 2002
    Posts
    27

    can subdomains access main cgi-bin?

    can subdomains access the main domain's cgi-bin... or is there a way to alias the subdomain address to a specified folder?

  2. #2
    Loyal Client
    Join Date
    Feb 2003
    Location
    Mission BC, Canada
    Posts
    37
    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

  3. #3
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    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
    Code:
    rmdir cgi-bin
    2. Next, create teh sym link:
    Code:
    ln -s ../cgi-bin 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.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  4. #4
    A-Henh! Weevil's Avatar
    Join Date
    Apr 2003
    Posts
    46
    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.

  5. #5
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    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
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •