Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
After Apache upgrade CGI stops working [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
binro
Guru
Guru


Joined: 06 May 2005
Posts: 525
Location: Bangkok, Thailand

PostPosted: Sat May 24, 2014 12:20 pm    Post subject: After Apache upgrade CGI stops working [SOLVED] Reply with quote

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
View user's profile Send private message
binro
Guru
Guru


Joined: 06 May 2005
Posts: 525
Location: Bangkok, Thailand

PostPosted: Tue May 27, 2014 6:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
toralf
Advocate
Advocate


Joined: 01 Feb 2004
Posts: 2745
Location: Hamburg/Germany

PostPosted: Tue May 27, 2014 8:25 pm    Post subject: Reply with quote

This works for me : http://bpaste.net/show/307461/
Back to top
View user's profile Send private message
binro
Guru
Guru


Joined: 06 May 2005
Posts: 525
Location: Bangkok, Thailand

PostPosted: Wed May 28, 2014 6:20 am    Post subject: Reply with quote

toralf wrote:
This works for me : http://bpaste.net/show/307461/

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
View user's profile Send private message
binro
Guru
Guru


Joined: 06 May 2005
Posts: 525
Location: Bangkok, Thailand

PostPosted: Sat May 31, 2014 1:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum