Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
20.1 Legacy Series
»
NGINX URL rewrite with Lets Encrypt
« previous
next »
Print
Pages: [
1
]
Author
Topic: NGINX URL rewrite with Lets Encrypt (Read 2158 times)
marcelmah
Jr. Member
Posts: 61
Karma: 3
NGINX URL rewrite with Lets Encrypt
«
on:
June 02, 2020, 10:41:53 am »
Hi,
I'm using OPNsense with the NGINX plugin to host a website (just some files) and redirect another domein to a Facebook page.
Both 'sites' have HTTPS working via Lets Encrypt.
One works fine, the URL redirect version does not renew. I created a certificate once when It was a normal site with a meta redirect in a HTML file, I changed it to a URL rewrite but now It also rewrites the challenge for Lets Encrypt.
My current rewrite rule is: ^/(.*)$
Any suggestions in how I can fix this?
Logged
fabian
Hero Member
Posts: 2769
Karma: 200
OPNsense Contributor (Language, VPN, Proxy, etc.)
Re: NGINX URL rewrite with Lets Encrypt
«
Reply #1 on:
June 02, 2020, 08:48:07 pm »
This matches every URL. It must not match ".well-known". So just exclude everything that starts with a dot.
Logged
marcelmah
Jr. Member
Posts: 61
Karma: 3
Re: NGINX URL rewrite with Lets Encrypt
«
Reply #2 on:
June 03, 2020, 05:03:04 pm »
Hi,
Sorry for the late reply.
This was my thought also, but I have no experience with regex.
I Googled before I posted for a solution, but the code I found breaks the NGINX service in OPNsense when I paste it in the input field.
Could you or anyone tell me what I should enter exactly to allow .well-known to pass trough and not be redirected?
PS. I should have posted this in my first post...
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
20.1 Legacy Series
»
NGINX URL rewrite with Lets Encrypt