Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache 2.2.8 enabling ssi/shtml 1

Status
Not open for further replies.

Tarnish

Technical User
Nov 13, 2006
221
US
Hi all,

I'm kind of new to apache administration. I've recently added 2.2.8 to my notebook for use with web development but I've run into some config (I think) problems.

When I try to test a page with the extension .shtml the page just loads as text. I think I am also not setup to handle includes which I need to fix.

Can anyone direct me? I have access to the httpd.conf file (or any other .conf file I need, I believe), but I'm just not sure which directives I need to use and whatnot.

I tried adding this to my httpd.conf file, but it didn't help any:

Options +Includes
AddType text/html .shtml
AddHandler server-parsed .shtml

That code came from an older version of apache, though, so maybe that's why it didn't work....or maybe I just left off some 'standard' syntax that should have been included with those additions.

Again, any help would be appreciated.

T
 
Hi elgrandeperro,

I think it's loaded. This line appears in the httpd.conf file:

LoadModule include_module modules/mod_include.so

T
 
Where did you put the directives (+includes)? You probably want to specify the exact directory.

Also, mine has it as includes_module, not include_module.
 
Hi again,

I tried taking off the s, but then the server wouldn't even function after that. When I switched it off and back on (wampserver), it now recognizes the .shtml files and appears to be handling those well.

However, the includes still don't show up and I checked the paths of them to make sure they were correct (I had moved the directory into the web server area).

I added those three lines from my previous post to the very end of the httpd.conf file. I didn't know where else to put them.

Thanks for your help.....half way home.

T
 
The first AddType and AddHandler lines usually appear where the other AddHandler like cgis are defined, but I think they will work on the end.

The Options +Includes appear in a Directory directive like this:

<Directory />
Options FollowSymLinks
AllowOverride None

</Directory>

# This is typically what you add:
<Directory /PATH/TO/YOUR/SHTML/>
Options +Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
 
Hi elgrandeperro,

Ok, here's what I've found.

1. That pair of lines (AddType) was already in the file, just commented out. I had that working I think anyway, because the shtml files were showing up. I deleted the ones I added and uncommented the others.

I didn't notice it yesterday, but a funny thing is if i load a .shtml file (in my browser served by apache) it will display, but if I refresh the page (which happens a lot during development), it then says the server can't find it. I don't get that, but...

2. Here's the block in my code that corresponds to that last part you posted:

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

That's code I found already in the file....not something I added. I did try adding the 'Options +Includes' as the first line below the <Directory /> line, but that didn't seem to help. I didn't put a directory path in there and was confused by which path you meant anyway.

I'm sure it's one line or so that's messed up...

Thanks again for your help.
T
 
Note:

The 'refresh' issue I mentioned is fixed. I'm back to just the includes problem.

Thanks,
T
 
You need to add the block underneath the </Directory >
which is like (Oh I forgot you were on a pc, so it is a windows path name:

# This is typically what you add:
<Directory "C:\PATH\TO\WHERE\YOUR|SHTML|RESIDES>
Options +Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
 
elgrandeperro,

That did it!

I REALLY appreciate your help and persistence. I spent hours trying to get that fixed...

Thanks again!
T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top