1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Changing cgi-bin location

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by Consultant1027, Jan 10, 2013.

  1. Consultant1027

    Consultant1027 New Pleskian

    17
     
    Joined:
    Nov 14, 2010
    Messages:
    24
    Likes Received:
    0
    We would like URL's that reference the cgi-bin directory to point to a cgi-bin-beta directory instead of cgi-bin but want to still use cgi-bin in the URL.

    I tried adding this line to /var/www/vhosts/beta.somesite.com/conf/vhost.conf

    ScriptAlias "/cgi-bin/" "/var/www/vhosts/beta.somesite.com/cgi-bin-beta/"

    Updated domain

    /usr/local/psa/admin/bin/httpdmng --reconfigure-domain beta.somesite.com

    Then stop and start Plesk for good measure. But didn't work. Still pulling from cgi-bin directory.

    Note this is for a subdomain beta. So the doc root is actually in /var/www/vhosts/somesite.com/httpdocs-beta but as I understand it, if you want to make config changes for the subdomain, you have to do them in /var/www/vhosts/beta.somesite.com since there's only one conf directory under the main domain.


    Anyone know how to pull this off?

    I'm actually running Plesk 11 but this forum has much more users and I don't think it makes a difference for something like this. Solution should be the same.

    Thanks
     
    Last edited: Jan 10, 2013
  2. Consultant1027

    Consultant1027 New Pleskian

    17
     
    Joined:
    Nov 14, 2010
    Messages:
    24
    Likes Received:
    0
    Then I couldn't remember for sure if psa starts/stops apache so I stopped and started apache with:

    /etc/init.d/httpd stop

    I then can see the error:

    [Thu Jan 10 09:57:08 2013] [warn] The ScriptAlias directive in /var/www/vhosts/beta.worldlux.com/conf/vhost.conf at line 20 will probably never match because it overlaps an earlier ScriptAlias.

    So question remains, how to override default ScriptAlias then?
     
  3. Alexey.Plotnitsky

    Alexey.Plotnitsky Regular Pleskian

    16
    55%
    Joined:
    Jan 19, 2012
    Messages:
    218
    Likes Received:
    3
    Hi Consultant1027,

    You can adjust vhost PHP template:
    /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php
    "ScriptAlias "/cgi-bin/" "<?php echo $VAR->domain->physicalHosting->cgiBinDir ?>/""
     
Loading...