Css page not showing up (wrong mime-type) on login page

Hello all,

I have just setup rt 3.8.8 on FreeBSD 8.1-RELEASE. It is all working
fine (so far anyway, I haven’t really setup the queues or groups yet,
and only a couple of test users) except I’m getting caught on the login
page where the CSS is not loading. This turns out to be an issue where
the mime-type is not being set correctly. I’ve observed this on a
handful of different browsers ranging from mac’s to windows to linux.
Searches haven’t found much for me thus far, both in this list, and
google in general.

I’ve verified httpd.conf, I’ve added “AddType text/css .css” although I
don’t see this problem for other webapps. I’m using mod_perl2 (perl
5.12) on Apache 2.2. I’ve also set the loglevel to debug and I see
nothing in particular in both the access and error logs for this vhost,
or the main access/error logs for apache. If anyone has suggestions on
what I can do to resolve this, or what else I can look at, it would be
great. Last thing, The only dependencies the rt script complains about
when I check for them iare the ones required for standalone server,
which I’m not using. Some details below:

What the error says:

Error: The stylesheet http://fqdn/NoAuth/css/web2/main-squished.css was
not loaded because its MIME type, “text/html”, is not “text/css”.
Source File: http://support.netwits.ca/
Line: 0

Error: The stylesheet http://fqdn/NoAuth/css/print.css was not loaded
because its MIME type, “text/html”, is not “text/css”.
Source File: http://support.netwits.ca/
Line: 0

Error: syntax error
Source File: http://FQDN/NoAuth/js/util.js
Line: 2
Source Code:

sigh in my haste to get this in before hopping on a call, I only
partly obfuscated the urls, but rest assured, there is no url-related
error here. Seeing as this is only temporarily housed at this domain
until it’s production ready, you can just click that link and see for
yourself what is occurring.

I can also add that I thought to check if mod-rewrite was doing
something weird, seeing as the .css files don’t actually exist, and I
noticed that without any 300’s in my logs, http://domain/whateverjunkuri
was being sent to the same landing page, but nothing seems to go through
mod-rewrite.

If anyone has any ideas on what else can cause this, I’d love to hear
from you. I need to get this to work properly so that others here can
start applying our design schemes to the page.

-SMOn 12/21/2010 03:07 PM, Sandro wrote:

Hello all,

I have just setup rt 3.8.8 on FreeBSD 8.1-RELEASE. It is all working
fine (so far anyway, I haven’t really setup the queues or groups yet,
and only a couple of test users) except I’m getting caught on the
login page where the CSS is not loading. This turns out to be an
issue where the mime-type is not being set correctly. I’ve observed
this on a handful of different browsers ranging from mac’s to windows
to linux. Searches haven’t found much for me thus far, both in this
list, and google in general.

I’ve verified httpd.conf, I’ve added “AddType text/css .css” although
I don’t see this problem for other webapps. I’m using mod_perl2 (perl
5.12) on Apache 2.2. I’ve also set the loglevel to debug and I see
nothing in particular in both the access and error logs for this
vhost, or the main access/error logs for apache. If anyone has
suggestions on what I can do to resolve this, or what else I can look
at, it would be great. Last thing, The only dependencies the rt
script complains about when I check for them iare the ones required
for standalone server, which I’m not using. Some details below:

What the error says:

Error: The stylesheet http://fqdn/NoAuth/css/web2/main-squished.css
was not loaded because its MIME type, “text/html”, is not “text/css”.
Source File: http://support.netwits.ca/
Line: 0

Error: The stylesheet http://fqdn/NoAuth/css/print.css was not loaded
because its MIME type, “text/html”, is not “text/css”.
Source File: http://support.netwits.ca/
Line: 0

Error: syntax error
Source File: http://FQDN/NoAuth/js/util.js
Line: 2
Source Code:

<!DOCTYPE html [several more "syntax errors" for other JS components] Error: doOnLoad is not defined Source File: http://support.netwits.ca/ Line: 24 What happens: the login page looks like... well, you can imagine what it looks like with no CSS loaded. Oddly enough, once I login, everything looks fine, and as long as it's cached, it then works fine if I logout and login again. Again, I have to stress this, this is ONLY on login, and if it is not cached.

If anyone has any ideas on what else can cause this, I’d love to hear
from you. I need to get this to work properly so that others here can
start applying our design schemes to the page.

Provide error/access logs and apache conf or all we can do is blindly guess.

Thomas

http://domain/whateverjunkuri was being sent to the same landing
page, but nothing seems to go through mod-rewrite.

Oh, you have an interesting config.
You appear to have disabled /NoAuth/
Try to load the main-squished.css file as referenced in the head of
the login page. You’ll get the login page again.

-kevin

Oh, you have an interesting config.
You appear to have disabled /NoAuth/

Where would that have happened? I don’t see anywhere short of the
$WebNoAuthRegex where this can happen, in terms of being available
without login only - and I haven’t overridden the default. As far as
Apache is concerned, it has access to that folder. Moreover, the images
load fine if I reload the login page after a login/logoff. There must
be something I’m missing/not thinking of.On Tue, 2010-12-21 at 18:05 -0500, Thomas Sibley wrote:

On 21 Dec 2010 17:59, Sandro wrote:

If anyone has any ideas on what else can cause this, I’d love to hear
from you. I need to get this to work properly so that others here can
start applying our design schemes to the page.

Provide error/access logs and apache conf or all we can do is blindly guess.

Thomas

Fair enough :wink:

Here are links to the files:

httpd.conf:
http://pastebin.ca/2025918

httpd-vhosts.conf (referenced in above file, for all vhosts):
http://pastebin.ca/2025937

RT_SiteConfig.pm:
http://pastebin.ca/2025922

Finally, Relevant loggging pasted below:

httpd-error.log:

[Tue Dec 21 21:30:28 2010] [info] Init: Seeding PRNG with 136 bytes of
entropy
[Tue Dec 21 21:30:28 2010] [info] Loading certificate & private key of
SSL-aware server
[Tue Dec 21 21:30:28 2010] [info] Init: Generating temporary RSA private
keys (512/1024 bits)
[Tue Dec 21 21:30:28 2010] [info] Init: Generating temporary DH
parameters (512/1024 bits)
[Tue Dec 21 21:30:28 2010] [info] Shared memory session cache
initialised
[Tue Dec 21 21:30:28 2010] [info] Init: Initializing (virtual) servers
for SSL
[Tue Dec 21 21:30:28 2010] [info] Configuring server for SSL protocol
[Tue Dec 21 21:30:28 2010] [info] mod_ssl/2.2.17 compiled against
Server: Apache/2.2.17, Library: OpenSSL/0.9.8n
[Tue Dec 21 21:30:28 2010] [notice] Apache/2.2.17 (FreeBSD)
mod_ssl/2.2.17 OpenSSL/0.9.8n DAV/2 PHP/5.3.3 with Suhosin-Patch
mod_perl/2.0.4 Perl/v5.12.2 configured – resuming normal operations
[Tue Dec 21 21:30:28 2010] [info] Server built: Dec 18 2010 01:45:11
[Tue Dec 21 21:30:28 2010] [debug] prefork.c(1018): AcceptMutex: flock
(default: flock)

httpd-access.conf

myIP - - [21/Dec/2010:21:39:08 -0500] “GET / HTTP/1.1” 200 5177 “-”
“Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.10 (KHTML,
like Gecko) Ubuntu/10.10 Chromium/8.0.552.224 Chrome/8.0.552.224
Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500]
“GET /NoAuth/css/web2/main-squished.css HTTP/1.1” 200 5223
http://support.netwits.ca/” “Mozilla/5.0 (X11; U; Linux x86_64; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10 Chromium/8.0.552.224
Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500] “GET /NoAuth/js/util.js HTTP/1.1”
200 5209 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U; Linux
x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500] “GET /NoAuth/css/print.css
HTTP/1.1” 200 5217 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U;
Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500] “GET /NoAuth/js/titlebox-state.js
HTTP/1.1” 200 5239 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U;
Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500] “GET /NoAuth/js/ahah.js HTTP/1.1”
200 5208 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U; Linux
x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500]
“GET /NoAuth/js/prototype/prototype.js HTTP/1.1” 200 5244
http://support.netwits.ca/” “Mozilla/5.0 (X11; U; Linux x86_64; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10 Chromium/8.0.552.224
Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:09 -0500]
“GET /NoAuth/js/scriptaculous/scriptaculous.js?load=effects,controls
HTTP/1.1” 200 5340 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U;
Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:09 -0500] “GET /NoAuth/RichText/fckeditor.js
HTTP/1.1” 200 5228 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U;
Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:10 -0500] “GET /NoAuth/images/bplogo.gif
HTTP/1.1” 200 5226 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U;
Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:10 -0500] “GET /NoAuth/images//favicon.png
HTTP/1.1” 200 5229 “-” “Mozilla/5.0 (X11; U; Linux x86_64; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10 Chromium/8.0.552.224
Chrome/8.0.552.224 Safari/534.10”

I’ve resolved this problem. It seems almost as though the underlying
scripts are written with some static references to the $webroot/share/*
of the webapp, rather than just $webroot, for reasons unknown. I can’t
confirm this, but the behaviour suggests it. So do the many refrences
in the config that start with share/… It may just be the port too,
I’d have to install from source to see if this is the same.

To keep things neat and tidy on this system, I moved the */rt38/html
folder from /usr/local/share/rt38/html to /usr/local/www/rt38/html.
Moving it back resolved this All is well now :slight_smile:

Regards,
SandroOn 12/21/2010 09:48 PM, Sandro Mancuso wrote:

On Tue, 2010-12-21 at 18:29 -0500, Kevin Falcone wrote:

Oh, you have an interesting config.
You appear to have disabled /NoAuth/
Where would that have happened? I don’t see anywhere short of the
$WebNoAuthRegex where this can happen, in terms of being available
without login only - and I haven’t overridden the default. As far as
Apache is concerned, it has access to that folder. Moreover, the images
load fine if I reload the login page after a login/logoff. There must
be something I’m missing/not thinking of.

On Tue, 2010-12-21 at 18:05 -0500, Thomas Sibley wrote:

On 21 Dec 2010 17:59, Sandro wrote:

If anyone has any ideas on what else can cause this, I’d love to hear
from you. I need to get this to work properly so that others here can
start applying our design schemes to the page.
Provide error/access logs and apache conf or all we can do is blindly guess.

Thomas
Fair enough :wink:

Here are links to the files:

httpd.conf:
http://pastebin.ca/2025918

httpd-vhosts.conf (referenced in above file, for all vhosts):
http://pastebin.ca/2025937

RT_SiteConfig.pm:
http://pastebin.ca/2025922

Finally, Relevant loggging pasted below:

httpd-error.log:

[Tue Dec 21 21:30:28 2010] [info] Init: Seeding PRNG with 136 bytes of
entropy
[Tue Dec 21 21:30:28 2010] [info] Loading certificate& private key of
SSL-aware server
[Tue Dec 21 21:30:28 2010] [info] Init: Generating temporary RSA private
keys (512/1024 bits)
[Tue Dec 21 21:30:28 2010] [info] Init: Generating temporary DH
parameters (512/1024 bits)
[Tue Dec 21 21:30:28 2010] [info] Shared memory session cache
initialised
[Tue Dec 21 21:30:28 2010] [info] Init: Initializing (virtual) servers
for SSL
[Tue Dec 21 21:30:28 2010] [info] Configuring server for SSL protocol
[Tue Dec 21 21:30:28 2010] [info] mod_ssl/2.2.17 compiled against
Server: Apache/2.2.17, Library: OpenSSL/0.9.8n
[Tue Dec 21 21:30:28 2010] [notice] Apache/2.2.17 (FreeBSD)
mod_ssl/2.2.17 OpenSSL/0.9.8n DAV/2 PHP/5.3.3 with Suhosin-Patch
mod_perl/2.0.4 Perl/v5.12.2 configured – resuming normal operations
[Tue Dec 21 21:30:28 2010] [info] Server built: Dec 18 2010 01:45:11
[Tue Dec 21 21:30:28 2010] [debug] prefork.c(1018): AcceptMutex: flock
(default: flock)

#########################################################

httpd-access.conf

myIP - - [21/Dec/2010:21:39:08 -0500] “GET / HTTP/1.1” 200 5177 “-”
“Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.10 (KHTML,
like Gecko) Ubuntu/10.10 Chromium/8.0.552.224 Chrome/8.0.552.224
Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500]
“GET /NoAuth/css/web2/main-squished.css HTTP/1.1” 200 5223
http://support.netwits.ca/” “Mozilla/5.0 (X11; U; Linux x86_64; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10 Chromium/8.0.552.224
Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500] “GET /NoAuth/js/util.js HTTP/1.1”
200 5209 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U; Linux
x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500] “GET /NoAuth/css/print.css
HTTP/1.1” 200 5217 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U;
Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500] “GET /NoAuth/js/titlebox-state.js
HTTP/1.1” 200 5239 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U;
Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500] “GET /NoAuth/js/ahah.js HTTP/1.1”
200 5208 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U; Linux
x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:08 -0500]
“GET /NoAuth/js/prototype/prototype.js HTTP/1.1” 200 5244
http://support.netwits.ca/” “Mozilla/5.0 (X11; U; Linux x86_64; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10 Chromium/8.0.552.224
Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:09 -0500]
“GET /NoAuth/js/scriptaculous/scriptaculous.js?load=effects,controls
HTTP/1.1” 200 5340 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U;
Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:09 -0500] “GET /NoAuth/RichText/fckeditor.js
HTTP/1.1” 200 5228 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U;
Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:10 -0500] “GET /NoAuth/images/bplogo.gif
HTTP/1.1” 200 5226 “http://support.netwits.ca/” “Mozilla/5.0 (X11; U;
Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10
Chromium/8.0.552.224 Chrome/8.0.552.224 Safari/534.10”
myIP - - [21/Dec/2010:21:39:10 -0500] “GET /NoAuth/images//favicon.png
HTTP/1.1” 200 5229 “-” “Mozilla/5.0 (X11; U; Linux x86_64; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.10 Chromium/8.0.552.224
Chrome/8.0.552.224 Safari/534.10”