Frustrated -> SSI Configuration, Apache2, Firefox, Debian

Discussion in 'Server Operation' started by ace1623, Jul 19, 2007.

  1. ace1623

    ace1623 New Member

    Ok, i have done the research, i have tried 100 solutions. I have read the website, and searched google for a week. I normally dont post to forums because i can find a post to help me, in this case... i cant.

    I have enabled the include module
    Code:
    a2enmod include
    I have unedited the lines in my apache2.conf file
    Code:
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    
    I have went into my virtual host setup and added the following snips
    Code:
    <Directory /*>
    Options +Includes
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    </Directory>
    
    And Firefox will still not parse an .shtml file. The file parses fine in IE, but thats just because IE seems to be a little more tolerant of server settings and code.

    Do i need to have
    Code:
    AddHandler server-parsing shtml
    
    anywhere in the configuration?


    I am so frustrated, i have no idea whats wrong or how to fix it. I feel like i have tried everything. What frustrates me the most is the answer is probably so simple that i will want to go shoot myself. Thank you so much for any help or feedback you can give me.

    -Arlis
     
  2. falko

    falko Super Moderator ISPConfig Developer

  3. ace1623

    ace1623 New Member

    Yes, i used that page, no luck though... i guess i may need to just pull out the old server's apache 1.3 or whatever httpd.conf file... I just feel like i have checked all the settings over and over.
     
  4. ace1623

    ace1623 New Member

    Another thing is this problem is very specific to Firefox... shtml shows up just fine in IE
     
  5. falko

    falko Super Moderator ISPConfig Developer

    I don't think that this is a browser-related problem.
    Are the source codes the same in each browser?
     
  6. ace1623

    ace1623 New Member

    Yes, the source code in both browsers are exactly the same....
     
  7. TimeJunky

    TimeJunky New Member

    Hello,

    I have the same problems on FireFox with Apache2 and Debian 4.x
    The guidelines of http://httpd.apache.org/docs/2.0/howto/ssi.html does not help me.


    On my last attempt I tried
    Code:
    OPTIONS -INDEXES +Includes ExecCGI
    AddType text/html .shtml 
    AddType text/x-server-parsed-html .html
    AddHandler server-parsed .shtml
    AddOutputFilter INCLUDES .shtml
    inbetween the optional apache directive of ISP-Config Administrator from the browser.


    Is there any solution yet?
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Did you enable SSI for that web site in ISPConfig?
     
  9. TimeJunky

    TimeJunky New Member

    Yes, I did.

    Here the config of that vhost in /etc/apache2/vhosts/Vhosts_ispconfig.conf_18-08-07_23-41-40

    Code:
    <VirtualHost 123.123.123.123:80>
    OPTIONS -INDEXES +Includes ExecCGI
    AddType text/x-server-parsed-html .html
    AddHandler server-parsed .shtml
    SuexecUserGroup nobody web39
    ServerName <servername ;) >:80
    ServerAdmin webmaster@<servername ;) >.net
    DocumentRoot /raid/web/web39/web
    ServerAlias bookmarks.<servername ;) >.net
    DirectoryIndex index.shtm index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl ind
    ScriptAlias  /cgi-bin/ /raid/web/web39/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /raid/web/web39/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php3>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php4>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php5>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /raid/web/web39/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /raid/web/web39/phptmp/
    php_admin_value session.save_path /raid/web/web39/phptmp/
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
    AddType text/vnd.wap.wml .wml
    AddType text/vnd.wap.wmlscript .ws .wmlscript
    AddType image/vnd.wap.wbmp .wbmp
    Alias /error/ "/raid/web/web39/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /raid/web/web39/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /raid/web/web39/user/$1/web/$3
    </VirtualHost>
    The preferences in /etc/apache2/apache2.conf are also changed to the path /raid/web

    Code:
    #<Directory /var/www/sharedip>
    <Directory /raid/web/*/sharedip>
        Options +Includes -Indexes
        AllowOverride None
    #    AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    
    ###############ispconfig_log###############
    LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
    CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m
    
    #<Directory /var/www/*/web>
    <Directory /raid/web/*/web>
        Options +Includes -Indexes
    #    AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo Options
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    #<Directory /var/www/*/user/*/web>
    <Directory /raid/web/*/user/*/web>
        Options +Includes -Indexes
    #    AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo Options
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    #<Directory /var/www/*/cgi-bin>
    <Directory /raid/web/*/cgi-bin>
        Options ExecCGI -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    Include /etc/apache2/vhosts/Vhosts_ispconfig.conf
    
    #npe
    # http://www.debianhowto.de/doku.php/de:howtos:sarge:apache2_security
    ServerTokens Prod
    Timeout 50
    
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Ok, can you do this:
    Code:
    cp /etc/apache2/vhosts/Vhosts_ispconfig.conf /etc/apache2/vhosts/Vhosts_ispconfig.conf_bak
    mv -f /etc/apache2/vhosts/Vhosts_ispconfig.conf_18-08-07_23-41-40 /etc/apache2/vhosts/Vhosts_ispconfig.conf
    httpd -t
    What's the output?
     
  11. letic

    letic New Member

    Hey Falko, Till,

    I had an issue on a test server that was a brand new Etch install. But as it was only a test server with a Mysql dump of the production ispconfigDB so I didn't noticed this problem until recently that I tried to make some changes in ISPConfig on the test system.

    Apache came back with a wrong syntax all the time, and when trying to use the Vhost.conf generated and start apache I get lots of
    Code:
    VirtualHost my-ip:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    The Vhost.conf file didn't have the port at the end of the VirtualHost line. I found out the script responsible and it's coming from a wrong detection of apache version in /root/ispconfig/scripts/lib/config.lib.php, more specifically here :
    PHP:
    $apache_version $this->apache_version();
    if(
    $apache_version == 1){
        
    $fp_resource_config "ResourceConfig /dev/null";
        
    $fp_access_config "AccessConfig /dev/null";
        
    $web_port "";
        
    $ssl_port "";
      }
      if(
    $apache_version == 2){
        
    $fp_resource_config "";
        
    $fp_access_config "";
        
    $web_port ":80";
        
    $ssl_port ":443";
      }
    So I checked apache_version() and found out the root of all issues : httpd seems to be missing in new version of Apache2 on Debian !!!!

    httpd -v
    bash: httpd: command not found

    I coudn't find any related bugs in bugs.debian.org but if somebody can do a brand new install of etch up to date I'm pretty sure that the symbolic link will be missing.

    The solution is very easy and will I'm sure sort other problems reported in the forum like this one : http://www.howtoforge.com/forums/showthread.php?t=14733&highlight=httpd

    Code:
    ln -s /usr/sbin/apache2 /usr/bin/httpd
    and everything is working again !

    Hope this help
    LeTic
     
  12. TimeJunky

    TimeJunky New Member

    Hi Falko,

    thx a lot, this hint was helping me to solve my problems with SSI!

    After mv the files as described above following errors appears:

    Code:
    Syntax error on line 92 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
    AllowOverride not allowed here
    which is equivalent to

    Code:
    <VirtualHost 123.123.123.123:80>
    AllowOverride Options FileInfo
    ...
    Searching for that results in
    http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride

    Therefore, I changed corresponding lines into
    Code:
    <directory /raid/web/web28/web>
    AllowOverride +Options +FileInfo
    </directory>
    
    ----------------------------------------------------------------------------

    2nd error:

    Code:
    Syntax error on line 1069 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
    SSLRequire not allowed here
    
    which belongs to the group of lines:
    Code:
    RewriteEngine on
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
    SSLOptions +StrictRequire +StdEnvVars
    SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128
    
    Note: I tried to restrict the access on a subdomain to https.

    -> Ok, an Apache Bug; not my fault *puh* :)

    http://marc.info/?l=apache-modssl&m=91218247305649&w=2

    Quick solution: <Location /> ... SSLRequire...</Location>

    Afterwards, I copied back /etc/apache2/vhosts/Vhosts_ispconfig.conf

    ------------------------


    Now SSI works with .shtml :) -> But not with .shtm

    I guess that I have to change the lines
    Code:
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    
    to get it work with .shtm.


    ------------------------------------

    Now one last problem disturbs me. Rewrite doesn't work neither inbetween <Location /> ...</Location> nor in <Directory /raid/web/web49/web/> ... </Directory>

    The rewrite rule above does only work within .htaccess.
    Code:
    RewriteEngine on
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
    SSLOptions +StrictRequire +StdEnvVars
    SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128
    
    Any idea?
     
  13. falko

    falko Super Moderator ISPConfig Developer

    Do you get any errors if you put it between <Directory ...></Directory>?
     

Share This Page