Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Let's assume that I have 2 virtualhosts running for the domains domain1.com and domain2.com. For these domains I set the documentroot to c:\server\htdocs\user\domains\domain1.com and c:\server\htdocs\user\domains\domain2.com. From these documentroot locations I want to be able to call perl or python scripts in a cgi-bin folder located 2 folders down from the documentroot (so c:\server\htdocs\user\cgi-bin) by using ../../cgi-bin/script.pl. This doesn't work, however, it does work when I call the script by using c:/server/htdocs/user/cgi-bin/script.pl

I have set up my server using xampp, and I have created a virtualhost containing ScriptAlias /cgi-bin/ "c:/server/htdocs/user/cgi-bin/", but this will not work for me. How do I go about this? I've tried looking on google for the answer, but all it comes up with is the default settings for a server without virtualhosts.

Any help would be greatly appreciated.

EDIT:

Note that I run my server on windows 7.

share|improve this question
    
you should just be able to use that script alias as it, map it into the the domain at /cgi-bin/ and just call your script as /cgi-bin/script.pl . you can't call scripts outside the docroot without using the alias. from the web. –  Doon Jun 20 '13 at 23:57
    
also tried calling it with /cgi-bin/script.pl, but that does nothing either. And I really don't want to put my cgi-bin folder inside my documentroot itself for obvious reasons. –  Gabi Barrientos Jun 21 '13 at 0:01
    
what is the error message when calling at as /cgi-bin/script.pl ? Also are you sure you have the vhosts working? IE can you see domain1 vs domain2 based on host headers? –  Doon Jun 21 '13 at 11:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.