The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Apache SSI problem
Author: BBB 
Date:   08-01-01 12:47

Short: SSI doesn't work.

I run FreeBSD 4.1.1-stable, I loaded some virtual hosts in the httpd.conf, eveyrthing runs smoothly, EXCEPT, SSI doesn't work at all. I noticed that in my httpd.conf, there was no option "LoadModule includes_module libexec/apache/mod_include.so", so I searched on internet, found an mod_include.so file and placed it there, added this line, but still no SSI.

First, how the #$%^is it possible that fBSD comes with an apache without basic support for such an important thing? Or am I doing something REALLY wrong? And, most importantly, how do I adapt the basic fBSD 4.1.1-stable Apache to support SSI?

My httpd.conf virtual host entries all include the "Options Includes"-line, they all include the "AddHandler server-parsed .shtml"-line and I added some precompiled mod_include.so-file (as already said above). This might be a problem, but where do I get the source file? (I could not find any).....

Reply To This Message
 
 Re: Apache SSI problem
Author: elliot 
Date:   08-01-01 15:47

does ssi work under the non-vhost or default server? you might want to try that first.
AddModule mod_include.c - means that it's a builtin module, and always avaliable. mod_include isn't a DSO. i've always had to do lots of messing around when getting ssi to work. one convienent thing is the xbithack, which you may want to play with. presuming everything is set correctly, with a

AddType text/html .shtml
AddHandler server-parsed .shtml

send me your conf file, and i'll try and take a look at it.

-elliot

Reply To This Message
 
 Re: Apache SSI problem
Author: BBB 
Date:   08-01-01 18:10

get the conf file at ftp://ronald.bitfreak.net/pub/httpd.conf

I never knew that these AddModule mod_include.c meant that it was basically included. Nice to learn new things, and I removed the mod_include.so part (which doesn't need to be there after all)....
SSI still doesn't work, so if you can look at it, please do so. Thanks in advance!

Reply To This Message
 
 Re: Apache SSI problem
Author: BBB 
Date:   08-01-01 18:19

hmmm.....
after changing /var/www/html into /var/www in the Direcotry tag, SSI started working, as did CGI.... Weird.....

But hey, it works :-)

Reply To This Message
 
 Re: Apache SSI problem
Author: el_kab0ng 
Date:   08-01-01 18:59

Actually...the way I managed to get things to work was by directly assigning Directory containers for each virtual host. That way, your whole server doesn't allow SSI...just specific cases... Very important if you're security conscious.

In any event...here's an example of what I am talking about:

VirtualHost ip.address.of.host.some_domain.com
ServerAdmin webmaster@host.some_domain.com
DocumentRoot /www/docs/host.some_domain.com
ServerName host.some_domain.com
ErrorLog logs/host.some_domain.com-error_log
CustomLog logs/host.some_domain.com-access_log common
/VirtualHost

Directory /www/docs/host.some_domain.com"
# 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 All

AllowOverride AuthConfig Options
Order allow,deny
Allow from all

ErrorDocument 404 http://172.20.121.51/404.html
/Directory

It's important to note here that Options All sets everything but MultiViews. And unless you have multiple languages supported on your website, that shouldn't matter anyway. By setting a Directory container for each VirtualHost, you limit who can have SSI.

As a side not, I also changed the Server Parsed HTML extension from .shtml to just .html. That way I don't have to worry about multiple filenames when I'm developing. (Also, since hackers look for the .shtml extensions when probing for leakage...if an SSI doesn't work, the dir path where you are pulling your info from gets exposed within the HTML doc. So by dropping the "s" it makes your site less of a target.)

Just my 2 cents worth...

Reply To This Message
 
 Re: Apache SSI problem
Author: Dan Langille 
Date:   08-01-01 21:14

I know you were frustrated when you posted the message. But as your can see, saying things like "how the #$%^is it possible that fBSD comes with an apache without basic support for such an important thing?" isn't a wise thing.

First, FreeBSD is the operating system. Apache is what needed to be configured to get SSI running, not FreeBSd.

Second, I think you're confusing FreeBSD and Apache. Yes, you installed FreeBSD, but you didn't tell use how you installed Apache, or how you installed SSI. All of which are important items when diagnosing the problem.

There is an article on SSI on this website:

<a href="http://www.freebsddiary.org/apache-ssi.html">http://www.freebsddiary.org/apache-ssi.html</a>

Was that any help when you read it?

Reply To This Message
 
 Re: Apache SSI problem
Author: BBB 
Date:   10-01-01 18:05

Hmm, you're quite right.
Though FreeBSD is the one shipping the current cersion/configuration of the Apache on my system ;-)
Okay, my fault, though, I just made some stupid mistake....
Sorry for that.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org