huanix

chown -R huanix /

huanix header image 2

Apache Server Side Includes ( Apache2 SSI )

November 22nd, 2006 · No Comments · Apache2, Server, Xubuntu

Today has been a bit of a struggle while I endeavor to add a server side include on all of my pages. All I want to do is create a simple header.php file to add to all of my pages – it will start as a tracking mechanism, (mostly because I feel like I can provide more than AWstats), and hopefully evolve into a real header.

I have been working with the “/etc/apache2/apache2.conf” include file called “/etc/apache2/sites-available/default”; this is where the VirtualHosts are set. I’ve been trying to add a server side include (SSI) with

but I get an error that says one of the following (depending how I tweak it):

  • /etc/apache2/sites-enabled/000-default:3: was not closed.
  • Expected (something) but saw (something else)

I guess the point of the error is that the include tag won’t close properly, but it seems like no matter what I try I can’t get it to work. In my hunting, I found that it was an identified bug that was repaired in 1998… or so they say. I have to admit that I’m not sure if I should be placing the include inside any of the Directory tags, or if it goes in the VirtualHost tag.. or somewhere entirely different. Here are some of the resources I found helpful, and I’ll modify the post when I get it figured out. I do have a strong suspicion that this problem is related to an Unbuntu build of Apache, not Apache itself!!

  • http://httpd.apache.org/docs/2.0/howto/ssi.html
  • http://www.howtoforge.com/forums/archive/index.php/t-2513.html

I’m tired of futzing with it tonight.

I did solve one other problem today while I was installing sendmail through webmin. I repeatedly had the error:

  • apache2: Could not determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName

whenever I forced a restart of Apache; it turns out I wasn’t paying much attention when I installed the server, and I didn’t give it a fully qualified domain name – i used “huanix” instead of “huanix.com” .. the fix is simple, all I had to do was edit:

  • edit /etc/hosts
  • etc/hostname

to add the FQDN (huanix.com) and things worked out swell..

Another fix that may be just as easy is to open up the apache config file (in Ubuntu, /etc/apache2/apache2.conf), and add the line ServerName huanix.com. I might try a wildcard, like *.huanix.com, but i don’t know..

Incoming search terms:

  • apache2 ssi
  • ssi apache2 set
  • ssi lampp

Tags:

No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment