Mailing List Archive

RES: Virtual Hosts and SSI's
About CSS...
It can work at two fronts: inline(formated inside the html file - or
whatever:php, ,jsp, asp, cfml... -) and outline, linked outside the file,
just making some like <LINK rel="stylesheet"
href="directoryfromthefile/stylefile.css" type="text/css">, and you don´t
have to make changes to enable it on the httpd.conf

Regards,

Fernando Wendt

-----Mensagem original-----
De: Owen Boyle [mailto:obo@bourse.ch]
Enviada em: quarta-feira, 13 de fevereiro de 2002 04:52
Para: users@httpd.apache.org
Assunto: Re: Virtual Hosts and SSI's


Tom Ray wrote:
>
> I'm fairly new with setting up an apache web server. I have a Red Hat
> 7.1 machine here at my house, and I installed Apache 1.3.3 on it. I went
> through the httpd.conf file at set my virtual hosting up with IP's on
> the localnetwork so I can test some sites that way. 198.162.x.x, etc....
>
> What's happening now is none of my SSI's or any CSS's are working. I've
> made sure the ServerParse line for .shtml is uncommented in the
> httpd.conf, but it's still not working.
>
> IS there something I'm missing to make Server Side Includes and the
> Cascading Style Sheets work?

Don't know about CSS - it's up to the browser to handle the style
definitions. Nothing to do with apache. Are the definitions in a
separate file? Is the browser succeeding to download it? (check the
access_log).

As for SSI, you need to allow includes and add a handler, e.g.

# Allow Server-Side Includes
<Directory /path/to/your/shtml>
AddHandler server-parsed shtml
Options +Includes
</Directory>

Rgds,

Owen Boyle.

PS - Apache 1.3.3? That went out with the ark - 1.3.23 is now available,
you know!

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RES: Virtual Hosts and SSI's [ In reply to ]
That's what I thought, but when I view the page on my local machine the
CSS do no work at all.. but when I upload the same file to the actaul
web server (also a red ha 7.1 box) they work like a charm. It's just
very odd...maybe I need to play with the paths in the href command for
the style sheets.....but I set the directory structure up just as it is
on the web server it runs from...which is making me wonder why it';s
still now working

Fernando Reuter Wendt wrote:

>About CSS...
>It can work at two fronts: inline(formated inside the html file - or
>whatever:php, ,jsp, asp, cfml... -) and outline, linked outside the file,
>just making some like <LINK rel="stylesheet"
>href="directoryfromthefile/stylefile.css" type="text/css">, and you don´t
>have to make changes to enable it on the httpd.conf
>
>Regards,
>
>Fernando Wendt
>
>-----Mensagem original-----
>De: Owen Boyle [mailto:obo@bourse.ch]
>Enviada em: quarta-feira, 13 de fevereiro de 2002 04:52
>Para: users@httpd.apache.org
>Assunto: Re: Virtual Hosts and SSI's
>
>
>Tom Ray wrote:
>
>>I'm fairly new with setting up an apache web server. I have a Red Hat
>>7.1 machine here at my house, and I installed Apache 1.3.3 on it. I went
>>through the httpd.conf file at set my virtual hosting up with IP's on
>>the localnetwork so I can test some sites that way. 198.162.x.x, etc....
>>
>>What's happening now is none of my SSI's or any CSS's are working. I've
>>made sure the ServerParse line for .shtml is uncommented in the
>>httpd.conf, but it's still not working.
>>
>>IS there something I'm missing to make Server Side Includes and the
>>Cascading Style Sheets work?
>>
>
>Don't know about CSS - it's up to the browser to handle the style
>definitions. Nothing to do with apache. Are the definitions in a
>separate file? Is the browser succeeding to download it? (check the
>access_log).
>
>As for SSI, you need to allow includes and add a handler, e.g.
>
> # Allow Server-Side Includes
> <Directory /path/to/your/shtml>
> AddHandler server-parsed shtml
> Options +Includes
> </Directory>
>
>Rgds,
>
>Owen Boyle.
>
>PS - Apache 1.3.3? That went out with the ark - 1.3.23 is now available,
>you know!
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RES: Virtual Hosts and SSI's [ In reply to ]
Tom Ray wrote:
>
> That's what I thought, but when I view the page on my local machine the
> CSS do no work at all.. but when I upload the same file to the actaul
> web server (also a red ha 7.1 box) they work like a charm.

Hang on - what do you mean by "view the page on my local machine". Are
you using the web-server? i.e. are you going through a URL? You are not,
by any chance, using File -> Open Page -> Browse... If you are, then
watch out - all internal links will have to be relative in this case and
this can get messy. I would recommend always to use absolute paths (e.g.
href="/foo/bar.html" instead of href="../foo/bar.html") and always
browse the site via a webserver - never browse the pages directly from
the filesystem.

Your problem is certainly that the browser cannot find the file
containing the CSS definitions (check in the access_log and error_log to
see what it's looking for). Remember that CSS application is entirely
client-side - the server can only supply the file, it is up to the
browser how to apply the styles (see how far you get with Lynx, for
example...)

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org