2Fauth LXC: change IP/domain with Nginx Proxy Manager #1109
-
I just switched to the 2Fauth-LXC and would love to change the local IP to a local domain, as I did before with the docker variant. Unfortunately this isn't working in the LXC (changed here: /opt/2fauth/docker/docker-compose.yml) Keep up the great work! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 9 replies
-
After you edit it, did you rebuild the app? You also mentioned Nginx Proxy Manager. What happens when you add the (sub-)domain there and point it to the IP and Port of the app? Some apps do not care about the used hostname, hopefully also the case here. |
Beta Was this translation helpful? Give feedback.
-
Hey, I also get this issue, running LXC and behind Nginx Proxy Manager - getting gateway error no matter the settings i use in the .env; Attempted to make some changes to nginx instance also, but no joy and waited to see if anyone else had this issue/if a fix discussed. Happy to attempt any suggestions and post results |
Beta Was this translation helpful? Give feedback.
-
OK, this app gets an official DO NOT USE from me. Anyway, I found the problem and have a fix, but you will need to change this every time you change the URL.
Now you should be able to access 2FAuth on the URL. |
Beta Was this translation helpful? Give feedback.
-
In your NPM proxy for 2FA, may need make sure you have something like this in the advanced section
|
Beta Was this translation helpful? Give feedback.
-
Hi, I just installed 2fauth LXC today, but I can't get it working via NPM. Is it possible that the LXC container version of Helper Scripts has different files to modify? |
Beta Was this translation helpful? Give feedback.
-
I really would like the local IP access to work, which should work by default according to people who installed outside of Helper Scripts. I found I can add 2 URL's to the 2fauth.conf file, by doing this:
This changes the page from an nginx default page to a blank white page. But it seems the setting holding me back is the app config, in the .env file. If I try both URLs, they will both work seperately. I tried adding 2 on the same line, and duplicating the line, like this:
and
Sadly neither allowed both URLs to work simultaneously. Just the public URL should be enough to have both work. Strange. |
Beta Was this translation helpful? Give feedback.
OK, this app gets an official DO NOT USE from me.
It's not optimized to work on bare-metal and will require more knowledge than should be needed.
I think for the app, Docker is a better way for most users.
Anyway, I found the problem and have a fix, but you will need to change this every time you change the URL.
TRUSTED_PROXIES=
(ONLY for testing you can use*
but change before you start using it)cd
to the root of the app (/opt/2fauth/)php artisan config:clear