The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> SSI not working - Apache under Windows
Dr Z
post Sep 12 2006, 07:12 PM
Post #1


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



I bought a new lap-top and installed apache... Its working, including the vhosts.

I can not make SSI work (for include).

I have apache running on my PC (with SSI working) and I have been comparing the config files on the two. For the life me I can not find where I may have goofed.

Please note:
include module loaded and enabled (config file)

Added "Includes" on all directory Options

Added "AddType text/html" & "AddHandler server-parsed" for .shml .txt .inc
(I use txt and inc extensionsion for different type of files to be included)

No error messages in the apache error log.

If anyone can guess what I am doing wrong, or failing to do, I would appreciate the input.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 12 2006, 08:27 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Did you add Options Includes in the right place? I know I've made that mistake. I only have Apace 1.3 here. In httpd.conf there's first this bit:

# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>


Right below is this. Here's where you should add it, not above. At least if your document root is somewhere else than ...Apache/htdocs .


# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/path/to/document/root">

#
# 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 Indexes FollowSymLinks MultiViews Includes
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dr Z
post Sep 12 2006, 10:08 PM
Post #3


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



QUOTE(pandy @ Sep 12 2006, 06:27 PM) *

Did you add Options Includes in the right place? I know I've made that mistake. I only have Apace 1.3 here. In httpd.conf there's first this bit:

# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>


Right below is this. Here's where you should add it, not above. At least if your document root is somewhere else than ...Apache/htdocs .


# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/path/to/document/root">

#
# 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 Indexes FollowSymLinks MultiViews Includes




Thank you.
I did have "Includes" in all relevant directories...

However, in the mean time I solved the problem!

I commented out "AddType" for all extensions
and
I added

"AddHandler server-parsed" for .html & .htm

I know it does not jive with Apache SSI related page instructions (I have beeen looking at it for some time now), but it worked!

Perhaps, this may be useful to anyone trying to attempt to do the same




User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 12 2006, 10:46 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Do you mean it just didn't work for .html before but you could use .shtml? Cause you already has AddHandler for .shtml.

I don't think you should comment out all AddType directives or you'll *beep* up Mime types. glare.gif

I have this.
AddType text/html .shtml
AddHandler server-parsed .shtml .html .inc
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 12 2006, 10:48 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Come on! That isn't a bad word in this context! laugh.gif

I did *not* say the F word. I said the S word. Like in a S-driver. cool.gif

Dumb board - go beeping on me. ninja.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dr Z
post Sep 12 2006, 11:31 PM
Post #6


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



QUOTE(pandy @ Sep 12 2006, 08:46 PM) *

Do you mean it just didn't work for .html before but you could use .shtml? Cause you already has AddHandler for .shtml.

I don't think you should comment out all AddType directives or you'll *beep* up Mime types. glare.gif

I have this.
AddType text/html .shtml
AddHandler server-parsed .shtml .html .inc



After I read your reply, I tried something stupid for the fun of it ...

I commented out :
AddHandler server-parsed .inc

and went to a page that uses inc extensions for include files.... What would you guess? It still works!

Me thinketh that "AddHandler server-parsed" directive applies to the main file extension, not to the included files. If the main file extension is html or htm or shtml, who cares what the file extesion is for inclusions......

Good morning after supper! Or am I loosing my marbles?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 12 2006, 11:56 PM
Post #7


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



I think your *beep* server is *beep* *beep* *beep*! tongue.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dr Z
post Sep 13 2006, 12:54 AM
Post #8


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



QUOTE(Dr Z @ Sep 12 2006, 09:31 PM) *

QUOTE(pandy @ Sep 12 2006, 08:46 PM) *

Do you mean it just didn't work for .html before but you could use .shtml? Cause you already has AddHandler for .shtml.

I don't think you should comment out all AddType directives or you'll *beep* up Mime types. glare.gif

I have this.
AddType text/html .shtml
AddHandler server-parsed .shtml .html .inc



After I read your reply, I tried something stupid for the fun of it ...

I commented out :
AddHandler server-parsed .inc

and went to a page that uses inc extensions for include files.... What would you guess? It still works!

Me thinketh that "AddHandler server-parsed" directive applies to the main file extension, not to the included files. If the main file extension is html or htm or shtml, who cares what the file extesion is for inclusions......

Good morning after supper! Or am I loosing my marbles?



I do not know which beeber you are refering to...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 13 2006, 06:25 AM
Post #9


.
********

Group: WDG Moderators
Posts: 9,628
Joined: 10-August 06
Member No.: 7



QUOTE(Dr Z @ Sep 13 2006, 07:54 AM) *

After I read your reply, I tried something stupid for the fun of it ...

I commented out :
AddHandler server-parsed .inc


I don't use that at all. Or is it required for virtual hosts (I don't use them either)?

QUOTE

If the main file extension is html or htm or shtml, who cares what the file extesion is for inclusions......


No I don't think you need to specify the included files' extensions (.inc etc), at least I haven't.

But there are some issues with running both SSI and PHP on the same parent file extension (say .html). Here's my very kludgy configuration:

Run PHP as default on .html extensions:

CODE
    AddType application/x-httpd-php .phtml .php .html .htm


Then make exceptions for SSI in some sub directories, using the Location directive:

CODE
    <Location /foo/ >
    AddType text/html .shtml .html .htm
    </Location>


Make SSI work in files with .asp extensions in any(?) directory with

CODE
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml .html .htm .asp


(not sure if that "AddType text/html .shtml" line is really necessary, but like I said it's a bit kludgy).
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 13 2006, 08:43 AM
Post #10


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



QUOTE
No I don't think you need to specify the included files' extensions (.inc etc), at least I haven't.


You do if you want them, too, to be parsed for SSI. If you just want them to be included you don't have to list them.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dr Z
post Sep 13 2006, 07:52 PM
Post #11


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



QUOTE(Christian J @ Sep 13 2006, 04:25 AM) *

QUOTE(Dr Z @ Sep 13 2006, 07:54 AM) *

After I read your reply, I tried something stupid for the fun of it ...

I commented out :
AddHandler server-parsed .inc


I don't use that at all. Or is it required for virtual hosts (I don't use them either)?

QUOTE

If the main file extension is html or htm or shtml, who cares what the file extesion is for inclusions......


No I don't think you need to specify the included files' extensions (.inc etc), at least I haven't.

But there are some issues with running both SSI and PHP on the same parent file extension (say .html). Here's my very kludgy configuration:

Run PHP as default on .html extensions:

CODE
    AddType application/x-httpd-php .phtml .php .html .htm


Thank you Pandy... I guess I must have been too tired last night and, threfore was in the state of confusion. Today after going over everything once more, it became relatively clear.

Yes, I do not nedd the inclusion files' extensions.

I intend was to use html extension for all files except php. In other words, if a html file needed to use "include", this would be implemented through SSI.

PHP files will need to have php extension, and the will be included as "AddType application".

Thanks again.

Then make exceptions for SSI in some sub directories, using the Location directive:

CODE
    <Location /foo/ >
    AddType text/html .shtml .html .htm
    </Location>


Make SSI work in files with .asp extensions in any(?) directory with

CODE
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml .html .htm .asp


(not sure if that "AddType text/html .shtml" line is really necessary, but like I said it's a bit kludgy).

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th March 2024 - 11:00 PM