473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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!
Aug 26 '08 #1
1 2501
Atli
5,058 Expert 4TB
Hi.

You may have to add index.shtml to the DirectoryIndex directive.
So, it should look something like:
Expand|Select|Wrap|Line Numbers
  1. DirectoryIndex index.html index.htm index.shtml
  2.  
Sep 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Lian Liming | last post by:
Hi, all I want to write my own error handler function in php by using "set_error_handler()" function. I have made a test for this function but found it did not work. My test code is as following:...
4
by: timon | last post by:
I had created a project in .net 2003. However I can;t work on the previous version of .net. Is there have any way I can make the it work on previous version of .net?
0
by: ice godwater via .NET 247 | last post by:
(Type your message here) I created a Web Service with SSL ,my remote WinForm can work well with it ,but the remote WebFrom can't work. -------------------------------- From: ice godwater ...
10
by: 7stud | last post by:
I'm trying to get Apache set up on my system so I can use mod_python. I installed Apache 2.2.4 according to the following instructions: ...
1
by: misiek3d | last post by:
Hello I want to use IronPython as Windows Scripting Host language. Is it possible? How can I do it? I know that ActivePython works as WSH language but for specific reasons I need to use...
2
by: Deane | last post by:
Is it possible to *set* Apache credentials via PHP? I know you can read Apache credentials from PHP, but I want PHP to tell Apache that a session is authenticated. Essentially, I want to do...
1
by: Evan | last post by:
Hi, guys ~~ How can i work on VIM for python code? I use cscope plugin on VIM for C code before, it helps me to different function and search C variable where it is defined. I'm now...
1
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, How can i use apache to host my own website from my computer and how can i assign a unique domain to my webpage... Thanx >> ALI <<
0
xploreraj
by: xploreraj | last post by:
I can not run Apache Tomcat for servlets. Normal Java programs are running. I have installed the JDK (jdk1.6.0_18 & jre6) & Tomcat 5.5 properly. The port no. for Tomcat is 8080. I don't think any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.