|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Apache - Noob: Can't get SSI to work with Apache
First off I am a complete noob when it comes to doing anything with servers. I'm just beginning to learn today because I need to start adding SSI to my websites. I apologise in advance if I am making a really obvious mistake.
To test this, I have successfully installed apache and have read the official documentation on how to get SSI functionality working. Unfortunately, I can't get it to work at all. After reading tons of threads on this matter on various forums, I am still short of an answer. Being a complete noob, I am not used to editing the httpd.conf and so I think I have probably just screwed this up somehow. My test directory looks like this: index.shtml menu.html index.shtml contains <!--#include virtual="/menu.html" --> menu.html only contains html content without body, head or html tags The relevant parts of my httpd.conf look like this: Options Indexes FollowSymLinks Includes ... AddType text/html .shtml AddOutputFilter INCLUDES .shtml However, when I go to http://localhost/ it brings up a directory list instead of automatically opening index.shtml (as it would if it were index.html) and when I click on index.shtml, the page is rendered in code rather than content. I have also tried changing all the ".shtml"s to ".html"s and this renders the content of index.html correctly but ignores the SSI. Thanks very much for any help that anyone can provide! |
|
#2
|
|||
|
|||
|
Hi Fluffy,
Make sure that your httpd.conf file contains the following line: AddHandler server-parsed .shtml If you want your html files act as .shtml pages use AddHandler server-parsed .shtml .html To make index.shtml the default page for the site add the line below to the .htaccess file or the concerning VirtualHost section in httpd.conf: DirectoryIndex index.html index.php index.shtml |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > Apache - Noob: Can't get SSI to work with Apache |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|