My system is OpenSolaris 2009.06 running on AMD, the server is
Apache 2.2.13.
Apache was built with Sun's compiler from source last august.
$ ./configure --prefix=<Install directory name>
$ make
$ make install
Everything seemed to go fine.
Working my way through HTMLDog's tutorials I found that CSS was
being ignored if the HTML's DOCTYPE specified "strict".
After pestering the good folks at alt.utml, it appears that my
problem relates to my Apache configuration.
While the HTML and CSS passed W3C's markup and validation suites, I
was informed of Firefox's error counsole:
Error: The stylesheet http://j-little/sample.css was not loaded
because its MIME type, "text/plain", is not "text/css".
Source File: http://j-little/compliant.html
Line: 0
Here is a typical httpd.conf, from before I started using virtual
hosts:
User webuser
Group webgroup
ServerName my586
DocumentRoot /export/home/larryl/www/site.j_little/htdocs
listen 192.168.1.50:80
A poster at alt.html told me the httpd.conf needed:
LoadModule mime_module modules/mod_mime.so
And LoadModule statements for about 60 more modules.
mod_mime.so was not created when I built Apache, and neither were
any of the other modules I looked for from the poster's list.
The description of mod_mime at Apache's site states that its source
is "mod_mime.c", and that file is on my system. Do I need to build
mod_mime.so and repeat the process for all of the modules in the
poster's list? Is there a script that will do that?
I don't know enough to tell you which modules I need. I'll want
the mime stuff to work, SSL, and the usual features a person browsing
the web expects. Features I'll need when working through the web
tutorials.
What is my next move in configuring Apache?
Thanks
Larry
Thanks Davide:
I have that statement, the position of the href and type were
reversed, but I did change them to be like your example. It still
failed.
CSS:
.special { color: red; }
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>This HTML 4.1 Passed HTML and CSS Validation</title>
<link rel="stylesheet" href="/sample.css" type="text/css">
</head>
<body>
<p>This text should be black but change to <span class="special">
red where I have applied the class 'special'</span>. Now back to
black.</p>
</body>
</html>
Take the DOCTYPE statement out, part of the text is red.
Add the DOCTYPE, the text is all black.
In order to test against the W3C HTML and CSS validation service, I
have opened port 80 on my home firewall, and NAT that to my Solaris
system.
I'm not sure if I'm exposing myself to a security problem if I
publicize my home IP address, but if you would like to take a look at
this HTML I'd be glad to email it to you.
I use "larryl_tu...@IGNOREhotmail.com" as my "don't care
about spam" address, but remove the IGNOREs. Let me know if you're
interested here, email your email address, and I'll email my IP
address to you.
I appreciate your assistance.
Thanks
Larry
> I've sent you a mail.
Thanks Again Davide:
I don't see anything yet. I typed two "IGNORE"s in the email
address, but I saw the first displayed as "IGN...".
It should be <my first name with atrailing
"l">_tu...@hotmail.com.
I'm on the West Coast of the U.S. and will be heading for bed in
about an hour.
I should check that mailbox more often. Some woman, married to the
"Late Chief Mohammed Abed who was a contractor with the Government of
Cote D'Ivoire before he died after few days in the hospital."
Long story short, she wants to give ME "$4.500 Million Dollars",
that's 4 and a half billion dollars!
She does want a bunch of personal information, including my bank
account number.
Another email:
Your email address on SERIAL No:472-9768-79 has won a total cash
prize of £1,856,652 Great British Pounds in our New Email random
selection.
And another:
This is to inform you that you have been selected for a cash Prize of
£250,000 .00 TWO HUNDRED AND FIFTY THOUSAND POUNDS STERLING'S in
cash from thunderball section of the International programme held
in the United Kingdom.
I'm going to be RICH! :)
Larry
The address is still being truncated.
larryl_turbo
Try that as the part before the @ sign.
Thanks
Larry
.
Thanks Davide:
My email address is in clear text? I hope I don't get any spam.
> Anyhow, your IP address ain't so difficult to find, I can see your test
> page and I do see the red text. No problem with it. Is that the version
> with or without the 'doctype' line? Can you set it up the 'broken'
> version?
I suspected that my IP address could be found. I didn't know for
sure.
The index.html page has no DOCTYPE, and displays fine.
The first and fourth links, "Jonathan's exact HTML" and "Version of
Jonathan's HTML that was validated, but without DOCTYPE" display with
red text.
The second and fourth links, "Jonathan's exact HTML, with HTML 4.1
DOCTYPE added" and "Version of Jonathan's HTML that is validated"
don't display red text, at least not on my Firefox browser.
Do all of the links display the text for you with the middle part
in red?
> If I request directly the .css file I get it with 'text/plain' as
> his doctype, so nothing strange there.
Davide, I appreciate your effort to assist me.
Just curious, what part of the world are you in?
Thanks
Larry
Thanks Again Davide:
I'm sorry, I must be too tired, it's after 1:00 in the morning
here.
Let me try this again please.
I believe all four links should display the text identically. Some
black text, some red text, and some black text.
You did see that the second doesn't display red text. It's
identical to the first HTML, except for the DOCTYPE. It uses the same
CSS. Why doesn't it display with red text?
And I believe you will find that the third also doesn't display red
text, but that's identical to the fourth, that does display red.
Except that the fourth has the DOCTYPE removed.
The third HTML is the first HTML with syntax added to get it though
the W3C HTML and CSS validator. And it fails to display with the
colors specified by the CSS.
The fourth HTML is is identical to the fourth, with DOCTYPE
removed, and it displays the colors specified by the CSS.
Did the third link display red text? That HTML is identical to the
HTML in the fourth link, except for the DOCTYPE.
I'm about ready to call it a night. So I might not reply until
later in your day.
Davide, I appreciate your efforts.
Thanks
Larry
And again, thank you Davide:
My mime.types don't have "text/css css".
When I looked at the "site.toddle" sample site for O'Reilly's
Apache book, the mime.types doesn't have any reference to "css".
I added "text/css css" to my mime.types and restarted Apache.
Still no luck.
Thanks for your efforts. But I can't keep my head up any longer.
It's almost 3:00 in the morning here. Good night.
Larry
Good Evening Davide, and Hello to Everybody:
Thanks again for the effort you have made to help me.
Would you mind posting your httpd.conf file? I can understand if
you would rather not. I'm curious to know if you use LoadModule in
httpd.conf to load Apache modules, and if you identify their source as
shared objects, ".so" files.
I've put together a find and grep script and performed a case
insensitive search of every httpd.conf and mime.type file in the
samples for O'Reilly's Apache 3rd edition book.
Number of times the text "css" was found? Zero.
I've been stuck in Windows development for a few years and my
script writing skills may have deteriorated. So perhaps I've screwed
up, but at this time I believe Ben and Peter Laurie, the books
authors, never saw a need to use the letters "css", upper or lower
case, in either httpd.conf or mime.types for any sample.
I also looked for the letters ".so" in each sample's httpd.conf
files, same thing. Not one of their sample httpd.conf files refere to
any shared objects.
"LoadModule" is never used either.
Here's something. I just discovered "httpd -l"
Compiled in modules:
core.c
mod_authn_file.c
mod_authn_default.c
mod_authz_host.c
mod_authz_groupfile.c
mod_authz_user.c
mod_authz_default.c
mod_auth_basic.c
mod_include.c
mod_filter.c
mod_log_config.c
mod_env.c
mod_setenvif.c
mod_version.c
mod_ssl.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c
There is the mod_mime. So that's been compiled into my version of
Apache. I suppose I don't need to load any of these modules.
So why is my CSS being ignored with HTML using DOCTYPE?
I see that there is a newer version of Apache out, and I'm planning
on building it from source and installing it on my system. But I'd
like to get this issue resolved before doing that.
Davide, as I said before, I'm very grateful for the effort you have
extended to assist me.
Thanks
Larry
Thanks Again, And Again, And Again Davide:
I had the same result with IE, everything displays no problem.
I have two PCs, one dual booting OpenSolaris and XP Mediacenter,
the other dual booting Solaris and XP Pro. I'm posting this under XP
Pro.
The OpenSolaris PC is the one running Apache.
I decided to try it's Firefox, version 3.1b3.
All four pages display just fine! Black text, red text, black
text.
I then booted this machine to Solaris, and ran it's Firefox,
version 3.5.2.
Again, each page displays just fine.
So it now looks like a Firefox problem, something about the Windows
version of Firefox 3.5.5.
I'll pursue this in the Firefox forums.
Thank you for all of your efforts, and if you have any ideas I'd
appreciate hearing them.
Larry