Forum Discussion
http to https not working with nginx
Hi,
I have a problem about F5 iRule, i set the irule on F5 "
when_HTTP_REQUEST {
HTTP::host [HTTP::host]:443;
}" and it's working perfectly.
but when i changed my database from apache to nginx, https is not working. we run nginx as load balance before and set
proxy_set_header Host $host:443;, it worked well.
Could anyone give me any suggestions, please?
15 Replies
- JG
Cumulonimbus
Remove that irule from the virtual server, and let us know what exactly was not working when you accessed it. Any error messages?
- ispy_344504
Nimbostratus
Hi Jie, We've tried to remove irules before, and https web only shows 1 picture, it was the same problem as before that we don't insert host:443.
- JG
Cumulonimbus
Did you mean you have the same output page on your screen with or without the irule?
Without a clear description of what the problem is, we can only make guesses at what is not working.
- ispy_344504
Nimbostratus
Hi Jie,
Sorry, If our web service on the nginx, http web page is normal and it showed login page, but the https web page only showed one picture.
if our web service on the Apache, we set the irules on the https, and it works fine, it'll show login page as same as http page.
Before we use F5 LB, we used nginx LB instead, it has the same problem, but when we set "proxy_set_header Host $host:443" on the nginx, it solved the problem. is there any similar setting on F5? or can we use irules?
- JG
Cumulonimbus
I suspect that your application needs to be aware which scheme (HTTP or HTTPS) is used by the user to access it. You can try the following:
Edit the F5 virtual server's HTTP profile:
- For the field of "Request Header Insert", add "X-Forwarded-Proto: https" (no quotes);
- For the field of "Redirect Rewrite", select "All"
and see how that goes.
What application software is it, Weblogic, PHP, etc?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
