|
|
Apache Includes not working
|
|
|
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
I'm having trouble getting includes to work on pages I'm trying to serve. I've got the config file working properly I think.
Can anyone suggest some tests I can try, or something I can do to check if it works at all?
thanks
-Aaron
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Location: Berkeley, CA
Status:
Offline
|
|
What kind of includes are you trying to enable? And what changes have you made to httpd.conf?[/LIST]
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2001
Location: Silver Spring, MD, USA
Status:
Offline
|
|
I'm having the same problems.
I've made sure the include module is loaded and that I have added the handler. And using the standard <BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier> <!--include virtual=<font color = red>"/path/to/include"</font>--> </font>[/code] does nothing for me
|
PowerMac G4 450mhz 256mb RAM 2/26gb HD RagePro128 Internal Zip OS X.1
iMacDVSE Graphite 500mhz 256mb RAM 30gb HD OS X.1
Macintosh SE 1mb RAM 2/800k FD OS 6.0.3
Macintosh Quadra 610 25mhz 4mb RAM 230mb HD OS 7.1
Macintosh Quadra 605 25mhz 4mb RAM 80mb HD OS 7.1
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
Originally posted by Eugene:
<STRONG>What kind of includes are you trying to enable? And what changes have you made to httpd.conf?[/LIST]</STRONG>
I added the following line to make all html files parse
AddType text/x-server-parsed-html .html
I also uncommented the following:
#
# To use server-parsed HTML files
#
AddType text/html .shtml
AddHandler server-parsed .shtml
I get nothing with either .html or .shtml The code appears to be sound when I look at it in the browser. It just doesn't parse. It's rather upsetting. I'd really like this to work.
I'm trying to do the same thing as gfxgeek has up there, just getting blank space. though. The rest of the page renders fine.
-Aaron
[ 07-05-2001: Message edited by: SirCastor ]
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Oct 2000
Location: Washington, DC
Status:
Offline
|
|
First you should find out if the SSI parser is working at all. You can probably do that by loading the page, then viewing the source. Find the line where the code should have been included. See if the
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier><!--include virtual=<font color = red>"/foo/bar"</font>--> </font>[/code]
appears. If it does, then the SSI parser isnt even being called because if it was working, then it would be removing that and replacing it with the code.
If the include line is missing, then that means it was parsed, but nothing is being put in.
That'll help narrow down the possibilities.
Also... You did restart apache after making the configuration changes?
-tim
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
Originally posted by timster:
<STRONG>First you should find out if the SSI parser is working at all. You can probably do that by loading the page, then viewing the source. Find the line where the code should have been included. See if the
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier><!--include virtual=<font color = red>"/foo/bar"</font>--> </font></pre><HR></BLOCKQUOTE>
appears. If it does, then the SSI parser isnt even being called because if it was working, then it would be removing that and replacing it with the code.
If the include line is missing, then that means it was parsed, but nothing is being put in.
That'll help narrow down the possibilities.
Also... You did restart apache after making the configuration changes?
-tim</STRONG>
My Code is showing up. So I guess that the parser is not working (Or at least not parsing this page) I did restart Apache. Really all I did was go into the Sharing System Preferences, and "stop" and "start" it again. That should do it, right?
I have to admit, this is all really pretty new to me.
-Aaron
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2001
Location: Silver Spring, MD, USA
Status:
Offline
|
|
I'm just getting the include back in the source. Which I've already figured it wasn't parsing. But why? I even ps -ax'd httpd to make sure it was truly dead But everytime I start apache back up wether from cli or gui it seems to start 2 httpd. Not sure if this is the problem.
|
PowerMac G4 450mhz 256mb RAM 2/26gb HD RagePro128 Internal Zip OS X.1
iMacDVSE Graphite 500mhz 256mb RAM 30gb HD OS X.1
Macintosh SE 1mb RAM 2/800k FD OS 6.0.3
Macintosh Quadra 610 25mhz 4mb RAM 230mb HD OS 7.1
Macintosh Quadra 605 25mhz 4mb RAM 80mb HD OS 7.1
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Location: Berkeley, CA
Status:
Offline
|
|
Try adding a suffix to your html parts...like .sht:
AddType text/html .shtml .sht
AddHandler server-parsed .shtml .html
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2001
Location: Silver Spring, MD, USA
Status:
Offline
|
|
Yeah I've already done that. For instance my includes are located in htdocs/includes/file.inc
|
PowerMac G4 450mhz 256mb RAM 2/26gb HD RagePro128 Internal Zip OS X.1
iMacDVSE Graphite 500mhz 256mb RAM 30gb HD OS X.1
Macintosh SE 1mb RAM 2/800k FD OS 6.0.3
Macintosh Quadra 610 25mhz 4mb RAM 230mb HD OS 7.1
Macintosh Quadra 605 25mhz 4mb RAM 80mb HD OS 7.1
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
Originally posted by Eugene:
<STRONG>Try adding a suffix to your html parts...like .sht:
AddType text/html .shtml .sht
AddHandler server-parsed .shtml .html</STRONG>
No luck on my side. A good suggestion, but that shouldn't be necessary... the include should parse if it's .shtml or .html in my case. That's what the Config file says.
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Location: Berkeley, CA
Status:
Offline
|
|
Where are these includes located? Are they in ~yourname? If so, try looking at the yourname.conf file. I remember I had to edit that to enable FollowSymLinks in my userdir.
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Sep 2000
Location: Shallow Alto, CA
Status:
Offline
|
|
Around line 370 in my httpd.conf I have the following
<Directory />
Options FollowSymLinks +Includes
AllowOverride All
</Directory>
The default is
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
The +Includes lets you use includes
The AllowOverride All, lets you use .htaccess files in individual directories IIRC.
Make a backup and edit those two lines and you should be in business.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
Originally posted by foamy:
<STRONG>Around line 370 in my httpd.conf I have the following
<Directory />
Options FollowSymLinks +Includes
AllowOverride All
</Directory>
The default is
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
The +Includes lets you use includes
The AllowOverride All, lets you use .htaccess files in individual directories IIRC.
Make a backup and edit those two lines and you should be in business.</STRONG>
yeah, I have something similar to this in my .conf file. I changed it to match yours, but I'm still getting nothing. I've tried playing around with the individual directories as well. Still no luck. I've been reading over the manual, that's where I picked up this one..
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2001
Location: Silver Spring, MD, USA
Status:
Offline
|
|
Sweet! That works. Thanks a million floamy.
Btw I now have 3 httpd's start when doing apachectl start.
Anyone have any idea?
|
PowerMac G4 450mhz 256mb RAM 2/26gb HD RagePro128 Internal Zip OS X.1
iMacDVSE Graphite 500mhz 256mb RAM 30gb HD OS X.1
Macintosh SE 1mb RAM 2/800k FD OS 6.0.3
Macintosh Quadra 610 25mhz 4mb RAM 230mb HD OS 7.1
Macintosh Quadra 605 25mhz 4mb RAM 80mb HD OS 7.1
|
|
|
|
|
|
|
|
Senior User
Join Date: Sep 2000
Location: Shallow Alto, CA
Status:
Offline
|
|
Do you mean you see 3 httpd processes when running top or process viewer? If so, I think that's normal.... I've got 4 or 5 httpd processing going all the time.
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Location: Berkeley, CA
Status:
Offline
|
|
D'oh
I'm so sorry I missed such a critical piece of advice.
You have to add "Includes" to your httpd.conf, but generally not in the location foamy suggested.
Look about 20 lines down from the point he suggested. There's another set of rules. That's where you should add "Includes"
And you probably still have to edit youraccount.conf files to have includes work in userdirs.
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status:
Offline
|
|
Does anyone know if there's any Apache config tools on the way? Having one would make things like this much easier.
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2001
Location: Silver Spring, MD, USA
Status:
Offline
|
|
yeah I get 3 httpd when doing top.
|
PowerMac G4 450mhz 256mb RAM 2/26gb HD RagePro128 Internal Zip OS X.1
iMacDVSE Graphite 500mhz 256mb RAM 30gb HD OS X.1
Macintosh SE 1mb RAM 2/800k FD OS 6.0.3
Macintosh Quadra 610 25mhz 4mb RAM 230mb HD OS 7.1
Macintosh Quadra 605 25mhz 4mb RAM 80mb HD OS 7.1
|
|
|
|
|
|
|
|
Junior Member
Join Date: Feb 2001
Status:
Offline
|
|
Originally posted by dogzilla:
<STRONG>Does anyone know if there's any Apache config tools on the way? Having one would make things like this much easier.</STRONG>
Yeah! There's a really nice set of config tools that was just released a few weeks ago. The only downside is that it costs $1000!
It's called MacOS X Server 10.0
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Location: Berkeley, CA
Status:
Offline
|
|
Apache httpd spawns new processes when it receives more requests. Right now I have 6 httpd processes still showing up in top.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|