Forum

ReverseProxy don't load Styles and Scripts

Marvin
30 May 2012, 15:29
Hi,

I'm trying to use the new ReverseProxy Feature on my Hiawatha.
I have another Webserver with pyton on port 8080, but Hiawatha don't load (404) Styles and Scrips from/through the other Webserver.

Here is my config:
VirtualHost {
Hostname = sub.mysite.de
WebsiteRoot = D:\htdocs\www ---> without Hiawatha doesn't start, with ReverseProxy you don't need it, or?!
AccessLogfile = D:\Server\logs\nzb\access.log
ErrorLogfile = D:\Server\logs\nzb\error.log
ReverseProxy ^/(.?)$ http://localhost:8080
RequireSSL = yes

and here my Access-Log:
[30/May/2012:15:17:17 +0200] "GET / HTTP/1.1" 200 5106 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"
[30/May/2012:15:17:17 +0200] "GET /static/stylesheets/colorschemes/gold/gold.css?0.6.15 HTTP/1.1" 404 553 "https://sub.mysite.de/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"
[30/May/2012:15:17:17 +0200] "GET /static/javascripts/plush.js?0.6.15 HTTP/1.1" 404 553 "https://sub.mysite.de/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"
[30/May/2012:15:17:17 +0200] "GET /static/stylesheets/jqueryui/overcast/jquery-ui-1.8.15.custom.css?0.6.15 HTTP/1.1" 404 553 "https://sub.mysite.de/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"
[30/May/2012:15:17:17 +0200] "GET /static/javascripts/lib.js?0.6.15 HTTP/1.1" 404 553 "https://sub.mysite.de/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"
[30/May/2012:15:17:17 +0200] "GET /static/javascripts/plush.js?0.6.15 HTTP/1.1" 404 553 "https://sub.mysite.de/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"

Hiawatha version: 8.3.2
Operating System: Win2k8R2 x64


Kind regards,
Marvin
Hugo Leisink
30 May 2012, 15:37
Are you sure "^/(.?)$" is correct? This will match '/' and '/' followed by any character. My guess is that you need this:
ReverseProxy .* http://localhost:8080/


without Hiawatha doesn't start, with ReverseProxy you don't need it, or?!

It's true if you want to proxy all requests. For any other case, Hiawatha needs to know where to find the not-matching files. I just didn't want to make an exception for the WebsiteRoot setting in the single case where ReverseProxy is followed by '.*'.
Marvin
30 May 2012, 15:59
wow, you're very fast

thanks your fast answer, but ...

with .* or only / i get error code 400
Marvin
30 May 2012, 16:01
....

instead of 404 in the AccessLog
Hugo Leisink
30 May 2012, 16:07
Is it Hiawatha's typical error message? (big white text centered in dark blue screen)

What is in the logfile? Both Hiawatha's logfile and python's logfile.
Marvin
30 May 2012, 16:32
no, no erropages. I get the page but without styles and scripts.

[30/May/2012:16:15:22 +0200] "GET / HTTP/1.1" 200 5106 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"
[30/May/2012:16:15:22 +0200] "GET /static/stylesheets/colorschemes/gold/gold.css?0.6.15 HTTP/1.1" 400 1103 "https://sub.mysite.de/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"
[30/May/2012:16:15:22 +0200] "GET /static/javascripts/plush.js?0.6.15 HTTP/1.1" 400 1103 "https://sub.mysite.de/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"
[30/May/2012:16:15:23 +0200] "GET /static/javascripts/lib.js?0.6.15 HTTP/1.1" 400 1103 "https://sub.mysite.de/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"
[30/May/2012:16:15:23 +0200] "GET /static/javascripts/plush.js?0.6.15 HTTP/1.1" 400 1103 "https://sub.mysite.de/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"
[30/May/2012:16:15:23 +0200] "GET /static/stylesheets/jqueryui/overcast/jquery-ui-1.8.15.custom.css?0.6.15 HTTP/1.1" 400 1103 "https://sub.mysite.de/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0"


from the other Webserver i don't have any logfile, it can't make logfiles. blackboxed :/
Hugo Leisink
31 May 2012, 09:21
It looks to me as if the Python applications is generating the 400 errors.
Marvin
31 May 2012, 13:23
A year ago, I had the Apache Webserver and it worked. But it doesn't matter if this doesn't work, I like Hiawatha, less memory usage, better security features and faster. I still use hiawatha without the Proxy feature

and thanks for trying to help me
Hugo Leisink
31 May 2012, 13:25
Many applications are written for Apache and Apache only. It's what I call 'bad design'. Your Python application, is it something you downloaded from the web? In other words; can I see the code and try it myself? I'd like to see where the 400 error comes from. Just to make sure it isn't a bug in Hiawatha.
Marvin
31 May 2012, 14:19
i've wrote you an email with all infos to hugo at hiawatha - webserver . org
Subject : "ReverseProxy don't load Styles and Scripts"
This topic has been closed.