1
2
3
sudo a2enmod cgi
Your MPM seems to be threaded. Selecting cgid instead of cgi.
Module cgid already enabled
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#Beispiel meiner httpd.conf
# Servereinstellungen
Listen 80
ServerName localhost
ServerAdmin xxx@xxx.xxx
DocumentRoot /home/xxx/daten/www/public_html/
<Directory /home/xxx/daten/www/public_html/>
Options ExecCGI
AddHandler cgi-script cgi pl
AllowOverride None
Order allow,deny
Allow from all
</Directory>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
###################################################
# Virtueller Host testseite
###################################################
<VirtualHost 127.0.0.5>
ServerName testseite
ServerAdmin xxx@xxx.xxx
DocumentRoot /home/xxx/testseite/
<Directory /home/xxx/testseite/ >
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
Require all granted
</Directory>
DirectoryIndex /cgi-bin/mytest.cgi index.html index.htm
ScriptAlias /cgi-bin/ /home/xxx/testseite/cgi-bin/
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
Options +ExecCGI
1
2
3
4
5
6
7
sudo apt-get install apache2
sudo a2enmod userdir
sudo apt-get install libapache2-mod-perl2
sudo a2enmod perl
# hier *.conf anpassen
sudo apachectl configtest
sudo service apache2 start
1
2
3
4
5
6
7
# Inhalt /var/log/apache2/error.log
[Thu May 29 22:35:49.384712 2014] [mpm_event:notice] [pid 8259:tid 140393028708224] AH00491: caught SIGTERM, shutting down
[Fri May 30 09:09:05.304383 2014] [mpm_event:notice] [pid 1188:tid 140347609937792] AH00489: Apache/2.4.7 (Ubuntu) mod_perl/2.0.8 Perl/v5.18.2 configured -- resuming normal operations
[Fri May 30 09:09:05.304737 2014] [core:notice] [pid 1188:tid 140347609937792] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 30 10:26:23.680925 2014] [mpm_event:notice] [pid 1188:tid 140347609937792] AH00491: caught SIGTERM, shutting down
[Fri May 30 10:26:24.778879 2014] [mpm_event:notice] [pid 4759:tid 139905214011264] AH00489: Apache/2.4.7 (Ubuntu) mod_perl/2.0.8 Perl/v5.18.2 configured -- resuming normal operations
[Fri May 30 10:26:24.778969 2014] [core:notice] [pid 4759:tid 139905214011264] AH00094: Command line: '/usr/sbin/apache2'
1
2
3
4
5
6
7
127.0.0.1 - - [30/May/2014:10:10:16 +0200] "GET /index.html HTTP/1.1" 200 765 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0"
127.0.0.1 - - [30/May/2014:10:10:16 +0200] "GET /favicon.ico HTTP/1.1" 404 497 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0"
127.0.0.1 - - [30/May/2014:10:10:18 +0200] "GET /favicon.ico HTTP/1.1" 404 501 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0"
127.0.0.1 - - [30/May/2014:10:17:08 +0200] "GET /favicon.ico HTTP/1.1" 404 497 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0"
127.0.0.1 - - [30/May/2014:10:17:11 +0200] "GET /cgi-bin/mytest.cgi HTTP/1.1" 304 180 "http://testseite/index.htm" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0"
127.0.0.1 - - [30/May/2014:10:19:03 +0200] "GET /cgi-bin/mytest.cgi HTTP/1.1" 304 181 "http://testseite/index.htm" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0"
127.0.0.1 - - [30/May/2014:10:19:09 +0200] "GET /cgi-bin/mytest2.cgi HTTP/1.1" 404 516 "http://testseite/index.htm" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0"
AddHandler cgi-script .cgi .pl
Options Indexes FollowSymLinks MultiViews ExecCGI