www.webdeveloper.com
Results 1 to 3 of 3

Thread: Problem with .html Includes (SSI)

Hybrid View

  1. #1
    Join Date
    Nov 2010
    Posts
    1

    Problem with .html Includes (SSI)

    I've been trying to get SSI's enable on a server I've been working on. It is an Ubuntu 10.10 Server running Apache2, PHP5 and MySQL. The default page loads correctly and soon I will need to deploy it with html includes available. No amount of configuration on my part has fixed this. These are my notable config files. Does anybody see what I am doing wrong? And I am restarting the apache server after changes to the config files:


    From /etc/apache2/apache2.conf
    Code:
    AccessFileName .htaccess
    
    #
    # The following lines prevent .htaccess and .htpasswd files from being
    # viewed by Web clients.
    #
    <Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
    </Files>
    /etc/apache2/sites-available/default
    Code:
    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    
    DocumentRoot /var/www
    <Directory />
    Options FollowSymLinks
    AllowOverride All
    </Directory>
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews +Includes
    AllowOverride All
    Order allow,deny
    allow from all
    </Directory>
    
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
    AllowOverride All
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch +Includes
    Order allow,deny
    Allow from all
    </Directory>
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks +Includes
    AllowOverride All
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>
    
    </VirtualHost>
    /var/www/.htaccess
    Code:
    AddType text/html .shtml .html .htm
    AddHandler server-parsed .shtml .html .htm
    Options Indexes FollowSymLinks Includes
    My index.html page
    Code:
    <html><body><h1>It works!</h1>
    <p>This is the default web page for this server.</p>
    <p>The web server software is running but no content has been added, yet.</p>
    <!--#include virtual="/footer.shtml" -->
    </body></html>
    The .htaccess file does work properly because when I put gibberish into it I receive a 500 Internal Server Error. Can anybody see what I'm missing? This is a fresh LAMP install. I ran into the same problem getting it up and running on a Zend Server as well.

  2. #2
    Join Date
    Mar 2011
    Posts
    26
    I ran into the same problem. I think I had to copy one of those configuration files into the folder that the website was in. Don't forget to name your files with the .shtml extension.

    This won't be the first problem you run into tho' with ubuntu and apache, speaking from experience. I finally got everything set up the way I liked it and downloaded some fancy new Ubuntu program and it messed with some configuration file and the whole thing needed to be redone from scratch.

    My solution was simply reinstalling XP with the Abyss web server (aprelium.com/abyssws/). The only drawback is now the pages take about an extra 10th of a second to load. I can live with that compared to all the problems in Ubuntu (and other distro's) I kept running into.

  3. #3
    Join Date
    Mar 2011
    Posts
    26
    Another solution, if all else fails, would be to use PHP on your pages and use the PHP include function. I use PHP on my site that I'm hosting on the CPU in the basement--an Athlon 850mhz with only 256 MB RA,M and it works out quite well--

    www.emulation-station.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles