Apache downloads instead of displaying php and html
Apache was working fine until I upgraded with webmin. Among the patches it removed Suhosin.
Was Apache/2.2.8 (Ubuntu) PHP/5.2.
Now Apache/2.2.8 (Ubuntu) configured
The AddType seems to be missing for the root /www/var and it's real subdirs. It sends me the unprocessed php code as a download. Sends html also as a download. As a download I can't tell what the mime type is, but clearly not text/html.
http://
phpmyadmin -> /usr/share/
Another soft link does not reproduce that effect.
LAM is configured in a different directory and it has the problem as well.
Can I put Suhosin back on?
Here's my config: /etc/apache2/
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
<Directory />
<Directory /var/www/>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
ErrorLog /var/log/
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu apache2 Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jim Fieser
- Solved:
- 2011-01-30
- Last query:
- 2011-01-30
- Last reply:
- 2011-01-29
Better to configure the /etc/apache2/
Jim Fieser (jfieser) said : | #2 |
It's a link to the same file.
ls -la /etc/apache2/
total 8
drwxr-xr-x 2 root root 4096 2010-06-02 23:31 .
drwxr-xr-x 7 root root 4096 2011-01-29 04:57 ..
lrwxrwxrwx 1 root root 36 2010-06-02 23:31 000-default -> /etc/apache2/
That file is not making changes to my config. That's a clue! The /etc/apache2/
ln -s /etc/apache2/
to create a link but now it complains:
[warn] NameVirtualHost *:0 has no VirtualHosts
But webmin shows 2 /var/www Virtual hosts configured. I delete one, they both disappear, create 1, they both re-appear.
Jim Fieser (jfieser) said : | #3 |
I had to create soft links in /etc/apache2/
I had to add my types into apache2.conf
AddType application/
And I commented out the virtual host configurations in apache2.conf
# Include /etc/apache2/
I also took out the references to Virtual Hosts from httpd.conf because I don't need them.
I did learn that any modern browser has to have the cache cleared for any test of the system to function when the problem is the application data type.