Hello all I have a LAMP server using apache 2 on Debian Lenny on a VPS. I have this annoying error that I have a great difficulty in resolving. When I go to the site only using the address or ip I receive the following error (in ie) "file download - Security Warning Do you want to save this file, or find a program online to open it?" I get the same kind of error no matter which browser I use and I also get the same error from other computers. Does anyone know what the cause of the error may be? Best regards /DS
Looks like you did not configure your webserver to parse / execute php files. So did you install PHP?
Hi Ben I have installed php5 but I have not done any configuration of neither the apache2 server nor php5. What I have done is to install the both using apt-get. It would be greatly apreciated if you could either help me with how to configure what or direct me towards some good online reading on the subject! BR /Taher
You also need libapache2-mod-php5 for the "easiest" way of implementing php5-parsing capabilities for apache (others like suPHP, php as CGI etc. are possible as well). This should also install the mods-available config file for apache, which you might need to copy / link (ln -s) to the mods-enabled folder and restart apache. Normally that should be everything....
It seems that I already had the libapache2-mod-php5 installed. I assume it came along when I installed php5. How about the httpd.conf file? Is that where these things are configured? I can't seem to find that file (used locate httpd.conf). If I create it, where should I place it? Do I need to configure anything else in order for the apache server to find the httpd.conf file? /Taher
No need to beat around the bush.. The server can be reached at 79.99.2.84 When I go to 79.99.2.84 my client wants to download a file When I go to 79.99.2.84/index.php everything works fine. I have added the test.php containing phpinfo() And I will make a fresh installation of the server once I have understood what I made wrong.. Any and all help is greatly appreciated! BR /Taher
I tried navigating to your site's IP address, and it loops through an infinite loop loading over and over again (Firefox used) Your direct index.php file seems to work fine, so you have PHP installed, I think you need to add a directive in the apache config file (or try to add it using ISP Config - I use 3 not 2 so I am not sure if it exists there or not) The directive should point your default URL to the index.php (if thats what you want) Or you could try to edit the .htaccess file to do the same thing. Your PHP works fine though, I just tested it.
I can state the same. What you also might to check is whether index.php is added to the directoryIndex files.
When it comes to DirectoryIndex and the such I am quite lost. In the apache2.conf file I have changed the line "DirectoryIndex index.html" to DirectoryIndex index.html index.php" Is there anything else that I should do?
DirectoryIndex index.php index.html index.htm Try this in the .htaccess file of your web directory. You can put any file names you want there and Apache will load the first one it finds in the order it is listed.
I already have index.php after DirectoryIndex in the .htconfig.. =/ I think it's time to reinstall now..