PHP in .html files

Discussion in 'General' started by rutame, Dec 9, 2011.

  1. rutame

    rutame Member

    Hello,

    PHP scripts does not work in archives .html like index.html, etc. I triying to fix it but allways come back to its original configuration. I like to do this change for all domains at once.

    Where is the file with the configuration, because i had changed:

    Code:
    AddType application/x-httpd-php .php .php3 .php4 .html  in /root/ispconfig/httpd/conf/httpd.conf
    And this one:
    Code:
    /etc/apache2/vhosts/Vhosts_ispconfig.conf
    
    AddType application/x-httpd-php .php .php3 .php4 .php5 .html
    
    Thank you very much
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Make a copy of
    /root/ispconfig/isp/conf/vhost.conf.master in the /root/ispconfig/isp/conf/customized_templates/ folder and then adjust /root/ispconfig/isp/conf/customized_templates/vhost.conf.master.
     
  3. rutame

    rutame Member

    Thanks a lot Falko, is very usefull but that "fix" its for config the new vhost, is not it?
     
  4. falko

    falko Super Moderator ISPConfig Developer

    This configuration will also be used when you change an existing vhost in ISPConfig.
     
  5. rutame

    rutame Member

    Hellow Falko,

    I dont know how i can do that... that script is a little bit weird for me. What i should change?
    Code:
    {FP_RESOURCE_CONFIG}
    {FP_ACCESS_CONFIG}
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    <!-- BEGIN DYNAMIC BLOCK: namevhost -->
    {SERVERIP}
    <!-- END DYNAMIC BLOCK: namevhost -->
    #
    #
    <!-- BEGIN DYNAMIC BLOCK: vhost -->
    
    ######################################
    # Vhost: {SERVERNAME}
    ######################################
    #
    #
    <VirtualHost {IP}>
    {HTTPD_INCLUDE}
    {SUEXEC}
    ServerName {SERVERNAME}
    ServerAdmin {SERVERADMIN}
    DocumentRoot {DOCUMENTROOT}
    {SERVERALIAS}
    {DIRECTORYINDEX}
    {CGI}
    ErrorLog {WEB_ERROR_LOG}
    {PHP}
    {RUBY}
    {PYTHON}
    {SSI}
    {WAP}
    {STATSALIAS}
    {ERRORALIAS}
    {ERROR}
    AliasMatch ^/~([^/]+)(/(.*))? {HTTPD_ROOT}/{WEB}/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? {HTTPD_ROOT}/{WEB}/user/$1/web/$3
    {REWRITE_RULE}
    {FRONTPAGE}
    <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
      RewriteRule .* - [F]
    </IfModule>
    {WEBDAV}
    </VirtualHost>
    #
    {SSL}
    #
    #
    <!-- END DYNAMIC BLOCK: vhost -->
    Thank you very much
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Please try to add
    Code:
    AddType application/x-httpd-php .html
    below the {PHP} line.
     

Share This Page