The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to turn on SSI for all pages

Discussion in 'General Discussion' started by matt621, Jun 29, 2003.

  1. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Normally only pages with shtml extension are processed for SSI calls. How do I make it so that all html pages are scanned for SSI calls?

    thanks

    cPanel.net Support Ticket Number:
     
  2. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Okay, I found this:

    AddType text/html .shtml
    AddHandler server-parsed .shtml

    which I'd then add .html on each line. I presume this is in the httpd.conf file (found it at http://httpd.apache.org/docs/howto/ssi.html#configuringyourservertopermitssi)

    I did a whereis httpd.conf and it came back with:

    httpd: /usr/sbin/httpd /etc/httpd /etc/httpd.old /usr/lib/httpd /usr/share/man/man8/httpd.8.gz

    But I looked in each one and can't find that file.. where is httpd.conf?

    thanks

    cPanel.net Support Ticket Number:
     
  3. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    /usr/local/apache/conf

    cPanel.net Support Ticket Number:
     
  4. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Thanks and got it done. Working fine.

    cPanel.net Support Ticket Number:
     
  5. mweb

    mweb Member

    Joined:
    Mar 11, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    danger, will robinson...

    You might not want to do that. By saying .html is server parsed, the unfortunate side effect is that .html pages that don't have ssi components in them are going to be parsed by your server. This can cause degraded performance on a busy server.

    If you just want to server side parse a page at your whim, you're probably better off using the "XBitHack on" directive in your httpd.conf. This enables server parsing of any file that has the X bit set - i.e., chmod'ed 755.

    Inside a virtual host definition, it only sets it for the virtual host. Outside, it sets it as default for your entire server.

    Just put it at the top of the httpd.conf file. And restart httpd. Then upload your .html file and chmod it 755.

    cPanel.net Support Ticket Number:
     
  6. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    every page on my sites are alway ssi anyway.

    cPanel.net Support Ticket Number:
     
  7. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    If this is for your site only, I would add the one line (it's all you need really):

    AddHandler server-parsed html

    to an .htaccess file used for your site only; put it in your Document Root. The others are in correct in that, using it the way your are -- for the whole Server -- 'will' slow down everyone's sites and needlessly so.
     
    #7 Website Rob, Jun 30, 2003
    Last edited: Jun 30, 2003
  8. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Of the 200 or so accounts on the box, 1/3 are mine, and they all use ssi. Of the rest, all those that use FP I believe their files are .htm, so that takes care of another 1/3. The rest are my customers that I teach to use ssi, so most of them should be ssi. There are also a few in there that are php based sites, so they shouldn't be a problem either.

    Has anyone ever quantified the "slow down" of running 100% ssi over a 100% straight html server?

    cPanel.net Support Ticket Number:
     
  9. mweb

    mweb Member

    Joined:
    Mar 11, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Hard to do without doing it to a server under a live load.

    But you're in a good position to... let us know how it turns out :)

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page