address/index.php works using only using only address/ starts a download

Discussion in 'Server Operation' started by taher, May 16, 2010.

  1. taher

    taher New Member

    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
  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    Looks like you did not configure your webserver to parse / execute php files. So did you install PHP?
  3. taher

    taher New Member

    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!

  4. Ben

    Ben ISPConfig Developer ISPConfig Developer

    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....
  5. taher

    taher New Member

    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?

  6. taher

    taher New Member

    No need to beat around the bush..

    The server can be reached at

    When I go to my client wants to download a file
    When I go to 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!

  7. KZeeSoft

    KZeeSoft New Member

    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.
  8. Ben

    Ben ISPConfig Developer ISPConfig Developer

    I can state the same. What you also might to check is whether index.php is added to the directoryIndex files.
  9. taher

    taher New Member

    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?
  10. BorderAmigos

    BorderAmigos New Member

    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.
  11. taher

    taher New Member

    I already have index.php after DirectoryIndex in the .htconfig.. =/

    I think it's time to reinstall now..

Share This Page