SSI not working - Apache under Windows |
SSI not working - Apache under Windows |
Dr Z |
Sep 12 2006, 07:12 PM
Post
#1
|
Advanced Member Group: Members Posts: 221 Joined: 23-August 06 Member No.: 11 |
I bought a new lap-top and installed apache... Its working, including the vhosts.
I can not make SSI work (for include). I have apache running on my PC (with SSI working) and I have been comparing the config files on the two. For the life me I can not find where I may have goofed. Please note: include module loaded and enabled (config file) Added "Includes" on all directory Options Added "AddType text/html" & "AddHandler server-parsed" for .shml .txt .inc (I use txt and inc extensionsion for different type of files to be included) No error messages in the apache error log. If anyone can guess what I am doing wrong, or failing to do, I would appreciate the input. |
pandy |
Sep 12 2006, 08:27 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
Did you add Options Includes in the right place? I know I've made that mistake. I only have Apace 1.3 here. In httpd.conf there's first this bit:
# First, we configure the "default" to be a very restrictive set of # permissions. # <Directory /> Options FollowSymLinks AllowOverride None </Directory> Right below is this. Here's where you should add it, not above. At least if your document root is somewhere else than ...Apache/htdocs . # This should be changed to whatever you set DocumentRoot to. # <Directory "C:/path/to/document/root"> # # This may also be "None", "All", or any combination of "Indexes", # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # Options Indexes FollowSymLinks MultiViews Includes |
Dr Z |
Sep 12 2006, 10:08 PM
Post
#3
|
Advanced Member Group: Members Posts: 221 Joined: 23-August 06 Member No.: 11 |
Did you add Options Includes in the right place? I know I've made that mistake. I only have Apace 1.3 here. In httpd.conf there's first this bit: # First, we configure the "default" to be a very restrictive set of # permissions. # <Directory /> Options FollowSymLinks AllowOverride None </Directory> Right below is this. Here's where you should add it, not above. At least if your document root is somewhere else than ...Apache/htdocs . # This should be changed to whatever you set DocumentRoot to. # <Directory "C:/path/to/document/root"> # # This may also be "None", "All", or any combination of "Indexes", # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # Options Indexes FollowSymLinks MultiViews Includes Thank you. I did have "Includes" in all relevant directories... However, in the mean time I solved the problem! I commented out "AddType" for all extensions and I added "AddHandler server-parsed" for .html & .htm I know it does not jive with Apache SSI related page instructions (I have beeen looking at it for some time now), but it worked! Perhaps, this may be useful to anyone trying to attempt to do the same |
pandy |
Sep 12 2006, 10:46 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
Do you mean it just didn't work for .html before but you could use .shtml? Cause you already has AddHandler for .shtml.
I don't think you should comment out all AddType directives or you'll *beep* up Mime types. I have this. AddType text/html .shtml AddHandler server-parsed .shtml .html .inc |
Dr Z |
Sep 12 2006, 11:31 PM
Post
#5
|
Advanced Member Group: Members Posts: 221 Joined: 23-August 06 Member No.: 11 |
Do you mean it just didn't work for .html before but you could use .shtml? Cause you already has AddHandler for .shtml. I don't think you should comment out all AddType directives or you'll *beep* up Mime types. I have this. AddType text/html .shtml AddHandler server-parsed .shtml .html .inc After I read your reply, I tried something stupid for the fun of it ... I commented out : AddHandler server-parsed .inc and went to a page that uses inc extensions for include files.... What would you guess? It still works! Me thinketh that "AddHandler server-parsed" directive applies to the main file extension, not to the included files. If the main file extension is html or htm or shtml, who cares what the file extesion is for inclusions...... Good morning after supper! Or am I loosing my marbles? |
Lo-Fi Version | Time is now: 26th April 2024 - 09:40 AM |