-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example SSL setup for Nginx/Apache with certbot... #392
Comments
Thanks for the suggestion @corepay - sorry about your dog. :-) Glad you're enjoying FusionAuth. This is a great suggestion. The website and documentation is all open source.. you are also welcome to submit a PR. |
Fast reply - been noticing that.... So I just got it working 5 minutes ago. Following is an NGINX setup post-certbot
Not going to PR - I don't know enough to put code out there myself in the vulnerable position of experienced server admins exposing me... Be looking forward to seeing a docker-compose setup if/when you guys get around it. Eventually want everything scripted.... Thanks! |
In my home-enviroment i use virtualmin (apache) for simple webhosting +SSL. This is the Apache configuration im using. RequestHeader unset Host RequestHeader set X-Forwarded-Proto "https" The "/.well-known" proxy-exception is to facilitate certbot's validation. Without the "RequestHeader unset Host" i expirienced 500 server-errors in the adminBackend of fusionAuth. ( im not sure, yet i think #88 might benefit from this knowledge ) i hope this helps people setting up FA behind Apache. Nginx Im not a primary nginx user, but ive noticed there are some issues that seem header-related. In issue #406 @JesperWe suggests the use of 'proxy_redirect http:// https://;' when having issues with the redirect-url. #406 (comment) So it seems there are a few caveats when running behind apache/nginx that need to be documented. |
I've set up nginx as @corepay suggested. It seems to work ok, but I get an error in Chrome when, after the login in an iframe, the authentication redirects to http, instead of https. |
Solved following #406 (comment) |
Hello guys. Thanks for the nginx config, tested it and seems to work so far on my homologation cloud instance. 2 problems :
Using nginx with my subdomain and SSL (selfsigned certif though) : If I hit direclty the IP, without SSL (so without nginx redirecting anything) :
Nginx is showing one interesting log (I changed sensible datas obviously but mail address and server names are all right) in errors.log :
Maybe it's in fact a normal behavior from Nginx (I suppose it's normal to time out when you cannot reach what you want ... in this case, SMTP server), but the FusionAuth behavior is still not the same though, it does not error gracefully with nginx. For information :
Any idea where it could come from ? Posting just in case. |
What version are you on? It may be related to this issue ( #617 ). To confirm, you can pull the latest 1.16.0 image and re-try. |
Thanks for your very quick answer. Just deleted the container, pulled and relaunch. Not sure I understood why though. But I'm pretty new here 😃 |
Example SSL setup for Nginx/Apache with certbot...
Problem
4+ hours trying to figure out how to get NGINX to serve app via SSL. Can reach site using https:// now but getting Maintenance mode. Been stuck for a long time banging the keyboard and kicking the dog.
Tried Caddy but that blew up the Internet it was so wrong.
Using Digital Ocean One-Click Install (perfect!). IMO if you provide a installation for a public site, good security citizenship would be to walk dummies like me through securing our installations to thwart hackers and protect the universe.
BTW - I love, love, love FusionAuth. It is very polished, complete as far as I can tell and am excited to use this in my dream apps...thank you.
Solution
Sample generic APACHE and NGINX configuration with certbot- ideally in docker-compose and part of one-click...think about Caddy also :)
Alternatives/workarounds
Additional context
How to vote
Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.
The text was updated successfully, but these errors were encountered: