Cannot access website FF tries to download application/x-httpd-php

I tried installing a mail client on my server and somehow the regular site got messed up. I played around a bit with Postfix, Sendmail and Squirrelmail. My server uses Debian, Apache2. I'm not sure where I went wrong. Every time I try to visit the site Firefox tries to download a application/x-httpd-php file. I tried adding AddType and others to the .htaccess page, but nothing works.
kiannack55Asked:
Who is Participating?
 
kiannack55Connect With a Mentor Author Commented:
Iptables blocked web traffic. Had to reconfigure iptables
0
 
sapparodCommented:
I think you hoave to make sure that you enable mod_php if you are using apache with prefork.
In case, you are using apache-worker, you need to check the cgi setting and enable module fcgid(for example).
Finally make sure that you config apache to the right folder with +execcgi option.
0
 
kiannack55Author Commented:
I tried to enable mod_php and it said it was already enabled. Then I enabled the mod_fcgid and I can't visit the site using the url, but when I visit it using its ip address it still tries to download the application/x-httpd-php file. Then I tried adding
<Directory /home/*/public_html>
Options +ExecCGI
AddHandler cgi-script .cgi
</Directory>

to the httpd.conf file and restarted the server and nothing changed.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
kiannack55Author Commented:
I checked the Apache2 error.log and it had multiple messages like this
[Tue Jan 05 08:29:28 2010] [warn] child process 8619 still did not exit, sending a SIGTERM
[Tue Jan 05 08:29:35 2010] [notice] caught SIGTERM, shutting down
[Tue Jan 05 08:34:09 2010] [notice] FastCGI: process manager initialized (pid 8873)
[Tue Jan 05 08:34:10 2010] [notice] Apache/2.2.9 (Debian) mod_fastcgi/2.4.6 PHP/5.2.6-1+lenny4 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Jan 05 08:34:44 2010] [notice] caught SIGTERM, shutting down
[Tue Jan 05 08:34:46 2010] [notice] FastCGI: process manager initialized (pid 8919)
[Tue Jan 05 08:36:23 2010] [error] [client 213.180.#.#] File does not exist:....
0
 
sapparodCommented:
if you have mod php. don't use cgi. choose one of them.
0
 
kiannack55Author Commented:
I disabled the cgi mod using "a2dismod cgi" and nothing has changed.
0
 
kiannack55Author Commented:
I have reinstalled apache 2, bind and webmin and have gotten nowhere, any advice is gratefully appreciated.
0
 
sapparodCommented:
Do the problem exists when access with other browser IE, chrome?
0
 
kiannack55Author Commented:
Yes, but they don't specify the file type like FF does.
0
 
sapparodCommented:
please  see the config file of mod php
you should see something like :

        <FilesMatch "\.ph(p5?|tml)$">
                SetHandler application/x-httpd-php
        </FilesMatch>

In case, you cannot see it please turn on mod info and access to http://localhost/server-info it should show all of your config there post it here thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.