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.

I want to access this page (working)

http://stats.example.com/cgi-bin/awstats.pl?config=www.example.com

via

http://stats.example.com/?config=www.example.com

<VirtualHost *:80>
        ServerName stats.example.com
        DocumentRoot /usr/lib/cgi-bin/
        DirectoryIndex awstats.pl
</VirtualHost>

however this triggers the download of awstats.pl, obviously not my intention. How can I make this work, or is there a concept I am missing?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It is not sufficient that the script be in a directory called "cgi-bin" on the filesystem; it must be using the cgi-script handler. Use a SetHandler directive to set the handler within a <Files> section to restrict it to the appropriate filenames.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.