1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

index.php not processed (PHP, Apache2)

Discussion in 'Plesk for Linux - 8.x and Older' started by Feldprediger, Jan 2, 2005.

  1. Feldprediger

    Feldprediger Guest

    0
     
    Hi,
    i've got a very strange problem with a subdomain:
    When I open http://subdomain.domain.com/, the Browser (Firefox) prompts the download-window (the server didn't process the index.php) and downloads the index.php but when i open the index.php directly (http://subdomain.domain.com/index.php) all works fine.
    So, where is the misconfiguration?
    This problem apears only with this one domain, but I can't see anything special in the configurationfiles belong to this domain (the only special is, that it was the first domain, "delivered" with the server ;-)
    Any ideas?
    Hopefully,
    Stephan
     
  2. anton_latvia

    anton_latvia Guest

    0
     
    May there is something special in that index.php (with PHP you may force to download it, instead of parsing it)? May be there is .htaccess file with some ReWrite rules?
     
  3. Feldprediger

    Feldprediger Guest

    0
     
    no, there is no .htaccess file.
    it's a standard GroupOffice installation , i had never trouble with.
     
  4. JoeBoo

    JoeBoo Guest

    0
     
    restart apache...
     
  5. Feldprediger

    Feldprediger Guest

    0
     
    I did... several times
     
  6. littlefrog

    littlefrog Regular Pleskian

    25
     
    Joined:
    Jul 30, 2008
    Messages:
    176
    Likes Received:
    0
    In your apache conf file what is "DirectoryIndex" set to.

    The file is located at
    /etc/httpd/conf/httpd.conf

    on 7.5.1

    If index.php is not in there (wasn't in mine on default) then put it there. Restart httpd and try viewing domain again.

    Make sure you close all browser windows again before you do just to make sure it forgets the last method it accessed the website.
     
  7. Feldprediger

    Feldprediger Guest

    0
     
    index.php is already existing in the httpd.conf at DirectoryIndex.
    I've added a second domain in the virtual host and there is no problem.
    There is actually no difference between the configuration for the two domains.
     
  8. anton_latvia

    anton_latvia Guest

    0
     
    May be there is difference in permissions for index.php or directory?
     
  9. Feldprediger

    Feldprediger Guest

    0
     
    the two domains direct to the same index.php. Here is the virtual host config:

    http://office.domain1.com -> download
    http://office.domain1.com/index.php -> normal
    http://office.domain2.com -> normal
    http://office.domain2.com/index.php -> normal
     
  10. rsalsa

    rsalsa Guest

    0
     
    I've noticed this in the httpd.include file:

    Code:
    <IfModule sapi_apache2.c>
         AddType text/plain .php .php4 .php3 .phtml
          php_admin_flag engine off
    </IfModule>
    
    I had the same problem with one of my clients with this. I added the following into the domain's vhost.conf file:

    Code:
    AddType application/x-httpd-php .php .php4 .html
    and restarted Apache and that did the trick. I don't know why Plesk adds text/plain for PHP. I always thought it needed AddType application/x-httpd-php. Its strange because all of my PHP files still work fine with text/plain, but this one customer had problems and I don't think he was doing anything not normal in his PHP files.
     
  11. Feldprediger

    Feldprediger Guest

    0
     
    Code:
    <IfModule sapi_apache2.c>
         AddType text/plain .php .php4 .php3 .phtml
          php_admin_flag engine off
    </IfModule>
    
    this adds plesk to your virtual host (in httpd.include), if php should not be available to your client:
    php_admin_flag engine off means that php-files will not be parsed by the webserver and so apache should handle them like textfiles (AddType text/plain .php .php4 .php3)
     
  12. anton_latvia

    anton_latvia Guest

    0
     
    Well.. May be something is screwed in Plesk or somewhere else.. Have you tried to remove that account completely (or was it subdomain?) and create again? Or may be try to disable/enable it (sometimes it could help, because Plesk rebuilds it's config files).
     
  13. dynaweb

    dynaweb Guest

    0
     
    I can confirm this works. Had a frontpage domain that was goofed like this. Did a disable/re-enable and apache restart then worked again after that. :)
     
Loading...