473,545 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Noob: Can't get SSI to work with Apache

1 New Member
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 2516
Atli
5,058 Recognized Expert Expert
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
2500
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: <?php function myerrorHandler ($errno, $errstr, $errfile, $errline, $errcontext) { switch ($errno) {
4
1175
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
1014
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 ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>XVYiV7pYO0SRFgjR6a6kTw==</Id>
10
8104
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: http://switch.richard5.net/isp-in-a-box-v2/installing-apache-on-mac-os-x/#comment-30704 and everything seemed to install correctly, but I can't start Apache. I typed in the following command: $ sudo...
1
2185
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 IronPython. regards Michal
2
1531
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 with an HTML form what Apache accomplishes with a pop-up window. Why? Because in addition to authenticating them, I need some other information,...
1
6734
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 starting to learn python, and I'd like to know how works on VIM. I saw that the VIM is support python such as syntax highlighting,
1
1946
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
1152
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 other application is using that port. I did the following: ->removed "invoker" comments in installdir\conf\web.xml. ->put my .class files in...
0
7410
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7923
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5984
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3466
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.