Nginx reverse proxy

Submitted by cyberfarer on 2013-11-18

Greetings

I am trying to use WebIssues with a Nginx reverse proxy. When I access the site, however, I get no CSS.

Within the nginx config, I have:

location ~* {
proxy_pass http://127.0.0.1:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded_Proto https;
proxy_redirect off;
}

Do you have any suggestions with what I could add to webissues to make this work?

WebIssues does load up with images, but there is no CSS formatting.

Thanks,

Thank you for the reply, Michal.

It appears I was barking up the wrong tree. The Nginx is working. The problem is the web browser is preventing "unsecured elements" of the web page from being displayed. The difference between web pages that display fully and WebIssues is that WebIssues uses the full URL rather than relative paths for css and js files. For example, this works:
<link rel="stylesheet" href="includes/css/passman.css" type="text/css" />
while this does not:
<link rel="stylesheet" href="http://subdomain.domain.com/webissues/common/theme/ui/jquery.ui.core.css" type="text/css" />

Is there a way to change these URLs to relative paths?

Thanks, again.

That's strange, because the web browser retrieves those elements using the full URL anyway. Unless you're using https:// and those full URLs use http:// - that would mean that the detection of the URL is broken. If that's the case, you could try modifying the getScriptUrl function in system/bootstrap.inc.php to hardcode 'https'.

Regards,
Michał

It seems to be getting the URL from the database in wi_settings with set_key base_url and set_value but changing it doesn't seem to help for some reason.

I will try your suggestion. Thank you.

Yeah, base_url is only used when sending emails, otherwise the code tries to determine the URL from the request.

Regards,
Michał