0

I just set up a fresh apache2 with these Options for CGI:

ScriptAlias /cgi-bin/ /var/www/cgi-bin
<Directory "/var/www/cgi-bin">
  AllowOverride None
  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  Order allow,deny
  Allow from all
  AddHandler cgi-script cgi pl 
</Directory>

I created the directory at /var/www/cgi-bin, added the scripts, made them executable, restarted the server, but it still says gives a 404 when trying to access the scripts.

Any ideas?

(Ubuntu 12.04 LTS)

  • Are the scripts executable by apache (should be userid www-data)? – Benjamin Bannier Nov 25 '13 at 11:31
  • Yes, I also tried changing the cgi-bin directory to /usr/lib/cgi-bin which is standard in ubuntu. No change... – Finn-Lennart Heemeyer Nov 25 '13 at 11:42
  • 1
    So how are you trying to access the scripts and what virtual host is the directive defined in? – Der Hochstapler Nov 25 '13 at 12:15
  • Its in the VirtualHost *:80 directive and I'm trying to access via the browser – Finn-Lennart Heemeyer Nov 25 '13 at 12:32
  • We kinda guessed you were using a browser :). The question is are they served by an HTML file? How? What are the scripts? Perl? Python? PHP? Do other webpages also give 404 or only scripts? – terdon Nov 27 '13 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.