PDA

View Full Version : Any Apache Gurus Out There? SSI [Re-opened]



Shhalahr Windrider
2010-08-02, 09:03 AM
As you may or may not know, I recently upgraded to a MacBook Pro laptop. Since I’m using it to do some web design work, I need to tweak the installed Apache server to fit my needs for local testing.

One of the sites I work on uses Server Side Includes. I was able to get that working with Apache 1.3 on my old iMac. Unfortunately, I can’t seem to get it working on the new computer with Apache 2.2. As near as I can tell, I’ve done everything I’m supposed to in order to activate SSI (http://httpd.apache.org/docs/2.2/howto/ssi.html) (including restarting Apache), but it still won’t work. Is there something I may be missing?

For Reference: Apache 2.2.14, Mac OS 10.6.4 (Snow Leopard), Intel Core i5

Whoracle
2010-08-02, 09:30 AM
Never worked with apache on OS X, but:

The guide says to modify httpd.conf OR .htaccess.
Which one did you do?

If httpd.conf: Does your apache really use the file you edited, or perhaps some other file somewhere? (you may have to start apache via command line to specify which config to use)

if .htaccess: Where is it? is it in the root folder of the page you're working on(e.g. /path/to/apache/htdocs/page/.htaccess)?
.htaccess has to be parsed somehow by your webpage or it won't work.

Ashtar
2010-08-02, 09:39 AM
Which method did you use to activate SSI ?
What does the Apache server do when you restart it?
Does it serve static pages okay?
Does it work but simply not evaluate the SSI commands ?
Did you place the override in the correct folder? Or did you use the x-bit trick ?
Which command did you try and test? Does the environment variable you tried to print exist?

Shhalahr Windrider
2010-08-02, 09:41 AM
Never worked with apache on OS X, but:

The guide says to modify httpd.conf OR .htaccess.
Which one did you do?
Tried both ways.


If httpd.conf: Does your apache really use the file you edited, or perhaps some other file somewhere? (you may have to start apache via command line to specify which config to use)
I successfully activated PHP using that file, so it’s definitely correct.


if .htaccess: Where is it? is it in the root folder of the page you're working on(e.g. /path/to/apache/htdocs/page/.htaccess)?
.htaccess has to be parsed somehow by your webpage or it won't work.
It’s in the parent of the directory with my test page. Should work there, right?


Which method did you use to activate SSI ?
I’ve tried all methods listed, including a short attempt at the XBitHack method.


What does the Apache server do when you restart it?
As long as I don’t have some unparseable typo, it seems to start okay. The error log says it is resuming with SSL, DAV/2, and PHP running. Should SSI be listed here when it is successfully restarted?


Does it serve static pages okay?
Yep. PHP, too.


Does it work but simply not evaluate the SSI commands ?
Seems to work okay, just doesn’t load SSI.

And, yeah, I mean it doesn’t load the SSI module. I forgot to mention in my original post that the error log records the following when I try my test shtml page:

“mod_include: Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed”

Even though I do have it set.


Did you place the override in the correct folder?
As far as I can tell.


Or did you use the x-bit trick ?
Gave that a try, too. Didn’t work. But I only gave that one attempt.


Which command did you try and test? Does the environment variable you tried to print exist?
So far, just <!-- #inclue virtual"…" -->

valadil
2010-08-02, 09:58 AM
Not sure about OSX. In debian I just symlink /etc/apache2/mods-available/include.load to /etc/apache2/mods-enabled/ and then restart apache.

Shhalahr Windrider
2010-08-02, 12:05 PM
Not sure about OSX. In debian I just symlink /etc/apache2/mods-available/include.load to /etc/apache2/mods-enabled/ and then restart apache.
I don’t have a mods-enabled directory, so I think the setup differs a bit here.

valadil
2010-08-02, 02:03 PM
I don’t have a mods-enabled directory, so I think the setup differs a bit here.

Oh well. I thought that directory setup was an Apache1 -> Apache2 thing, but it might just be a Debian thing.

Incidentally, how did you go about installing Apache? Did it come with OS X, or was there some other source?

Shhalahr Windrider
2010-08-02, 02:30 PM
Incidentally, how did you go about installing Apache? Did it come with OS X, or was there some other source?
Comes with the OS. Currently the default httpd.conf file, except for uncommenting one line to activate PHP and the changes to activate SSI. Very puzzling

factotum
2010-08-02, 03:24 PM
Oh well. I thought that directory setup was an Apache1 -> Apache2 thing, but it might just be a Debian thing.


It's almost a racing certainty it's a Debian thing--the Debian folks do have this endearing habit of thinking their standards are far better than other standards (up to and including the standards of the people who wrote the software in the first place).

Shhalahr Windrider
2010-08-04, 03:09 PM
Okay, I got my includes working, now!

Seems I had to dig out a user account-specific configuration file and add Options +Includes to that. Though I thought I had the allow/deny priority set so that wouldn’t be an issue. Ah, well, I suppose I’ll look into the specifics when I have time.

But thanks for the help, everyone! :smallbiggrin:

Shhalahr Windrider
2010-08-10, 05:06 PM
Okay, turns out the problem isn’t quite solved. Changing my user account configuration file only worked in the test folder where I had also used .htaccess file to try to get it working. It didn’t activate Includes on a more global level. Any ideas about where to go from here?