ip-stories.com

  •  

    September 2010
    M T W T F S S
    « Aug    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • Web Stat Counter

    • Search This Blog :

    • Add url
    • Add Me on FB

      Rahman Isnaini's Facebook profile
    • Hurricane Electric IPv6 Cert

      IPv6 Certification Badge for risnaini
    • comments

    • Visitors Referred From :

    • Geo Stats

    • Categories

    [Programming] Multiple Domain/Sub Domain for one [shared] CGI-BIN

    Posted by a. Rahman Isnaini r. Sutan on January 9th, 2009

    I’m using web authentication with Apache and working with one domain..
    I got confusing in adding another domain with working directory under the root directory under the first domain.

    Both domains require cgi-bin.
    The scheme : cgi-bin located in root directory of the first domain.
    Some said that :

    - cannot have two cgi-bin in one server
    - one cgi-bin could used by one domain/subdomain only.

    What I have tried and works :

    a. Existing Domain

    - Create New Root Directory for First Domain [used to be in htdocs]
    - Move All file needed in the Root Directory of First Domain to the new created one [Inclue .htacces & .htpasswd files]
    - Change all file in first domain which contain the “a href” link for all the linked page to cgi-bin directories & files.
    Before : [e.g] /cgi-bin/test.cgi
    After : [e.g] ../cgi-bin/test.cgi

    b. New Domain

    - Create New Root Directory for Second Domain/Sub Domain
    - So in htdocs there will be Root Directory of each Domain & cgi-bin as well.
    - Create in httpd.conf your new virtual domain and point to this new root directory.
    - Use the same link ../cgi-bin/test2.cgi [e.g] as above for “a href”

    c. Existing default Apache

    - Create file Index.htm which contains : “Not Authorized Page”
    In case of someone access default web by IP, still cannot see your default directory contents

    a. rahman isnaini r.sutan

    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>