0

And again I've got wrong apache configuration. My script don't want to be executed and browser trying to download it as a file.

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName president.com

DocumentRoot /var/www
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

ScriptAlias /cgi-bin/ /var/www/cgi/

<Directory /var/www/cgi/>
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Require all granted
AddHandler cgi-script .cgi .pl
</Directory>
  1. Scripts are own by www-data:www-data with rights 755 and can be executed (+x).
  2. Shebang e.g. #!/usr/bin/perl.
  3. Error log is empty.
1
  • 1
    not an programming question. You should to ask in Super User or on ubuntu. Commented Sep 9, 2014 at 7:42

1 Answer 1

1

Problem solved!

I remove all Require all granted (it's only for Apacvhe 2.4+) and paste:

Order allow,deny
allow from all

Also i move AddHandler cgi-script .cgi .pl to DocumentRoot directory description

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.