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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trivial SSI doesn't work in apache2 2

Status
Not open for further replies.

vwaju

Technical User
Feb 3, 2009
2
0
0
US
I am running Debian Linux 3.1 (debian-31r8-i38g-netinst.iso) on a Dell Dimension 4100 desktop. (This host is 192.168.2.2 on my LAN.) I'm running apache2, and doing some "finger exercises" to get better acquainted.

I created a trivial SSI, following Linux System Administration (O'Reilly), and configured apache2 to serve it:

Document Root is /var/ /etc/apache2/sites-enabled/000-default.

I added

<Location /ssi>
Options Includes
</Location>

and

<Location /ssi>
Options IncludesNoExec
</Location>

to /etc/apache2/sites-enabled/000-default.

I ran:

# a2enmod include
This module is already enabled!

and

# /etc/init.d/apache2 force-reload

I created /var/ and in this directory I ran:

echo "top stuff" > top.html
echo "bottom stuff" > bottom.html

Then I created middle.shtml:

<!--#include virtual="top.html"-->
middle stuff!
<!--#include virtual="bottom.html"-->

Firefox serves my home page as expected. (From the internet: For reaons I haven't figured out yet, I can't reach my home page from my own LAN using the my domain name.)

When I point Firefox at I expect to get the output:

top stuff
middle stuff!
bottom stuff

Instead, Firefox reports Error 404 ("Object not found!")

If I exectute:

If I point Firefox at
I get a single line of output:

"middlestuff" (the SSI's are not recognized).

What am I missing here?

Thanks for your help!

Best Regards,

Vwaju
New York City
 
Did you add add .shtml type:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
 
With a Location directive, it must be in /ssi. I assumed the first URL test was a typo:

As typed:
When I point Firefox at I expect to get the output:

Should be:
When I point Firefox at I expect to get the output:

The directory directive should also work. The other thing is that you stated <Location> twice, which I believe will invalidate the first one. But IncludesNoExec should work fine.
 
I guess I should have made that point. I was only addressing the fact that he couldn't access the page from his lan. The reason I saw was that he left off the /ssi. A typo never entered my mind. ;-)

 
Thanks you all for your thoughtful responses.

It seems that both


serve:

top stuff
middle stuff!
bottom stuff

to those you all outside of my LAN.

When I try it inside my LAN:


I get only:

middle stuff!

which shows that Apache is finding middle.shtml, but not recognizing the SSI commands.

I cant' think why this would be.

Thanks for your help. If you have further thoughts, I would be glad to hear them.

Best Regards,
Vwaju
NYC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top