View previous topic :: View next topic |
Author |
Message |
binro l33t
Joined: 06 May 2005 Posts: 724 Location: Bangkok, Thailand
|
Posted: Sat May 24, 2014 12:20 pm Post subject: After Apache upgrade CGI stops working [SOLVED] |
|
|
I have just made the minor upgrade of apache-2.4.9-r2 to apache-2.4.9-r3 and when I restarted it I get:
May 24 19:15:44 opal apache2[16294]: [cgi:error] [pid 16294] [client 127.0.0.1:49885] Options ExecCGI
is off in this directory: /var/www/localhost/htdocs/nagios/cgi-bin/status.
and all my PHP apps now just display the code. There were no significant changes to /etc/apache2 and my httpd.conf file has always contained:
Code: |
Options +ExecCGI
AddHandler cgi-script .cgi
|
Any ideas what has gone wrong?
TIA _________________ "Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Last edited by binro on Sat May 31, 2014 1:34 pm; edited 1 time in total |
|
Back to top |
|
|
binro l33t
Joined: 06 May 2005 Posts: 724 Location: Bangkok, Thailand
|
Posted: Tue May 27, 2014 6:15 pm Post subject: |
|
|
I fixed the problem with Nagios, it now requires a "-D NAGIOS" in the APACHE2_OPTS variable. But I still have the problem with php virtual hosts where the php script just gets displayed. Here is my /etc/apache2/modules.d/00_default_settings.conf:
<IfDefine DEFAULT_VHOST>
Listen 80
<VirtualHost *:80>
ServerName localhost
Include /etc/apache2/vhosts.d/default_vhost.include
# Keep PHP applications separate
Alias "/phpsyslogng" "/var/www/phpsyslogng"
<Directory "/var/www/phpsyslogng">
Options +Indexes +FollowSymLinks +ExecCGI
Require all granted
</Directory>
Alias "/phpmyadmin" "/var/www/phpmyadmin"
<Directory "/var/www/phpmyadmin">
Options +Indexes +FollowSymLinks +ExecCGI
Require all granted
</Directory>
</VirtualHost>
</IfDefine>
Aany idea why this is suddenly not working after years? _________________ "Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
|
Back to top |
|
|
binro l33t
Joined: 06 May 2005 Posts: 724 Location: Bangkok, Thailand
|
Posted: Wed May 28, 2014 6:20 am Post subject: |
|
|
Thanks but I have exactly the same definitions. _________________ "Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling |
|
Back to top |
|
|
binro l33t
Joined: 06 May 2005 Posts: 724 Location: Bangkok, Thailand
|
Posted: Sat May 31, 2014 1:33 pm Post subject: |
|
|
Doh! All it was was that APACHE2_OPTS in /etc/conf.d/apache2 needed a "-D PHP5" added to activate the PHP5 module. I have seen no warning about this and the comments in the conf.d file have not been updated. _________________ "Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling |
|
Back to top |
|
|
|