• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Changing cgi-bin location

Consultant1027

New Pleskian
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:
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?
 
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 ?>/""
 
Back
Top