Skip to content
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

Application redirects to https://127.0.0.1:8888 #303

Open
qits-kkruse opened this issue Dec 20, 2024 · 2 comments
Open

Application redirects to https://127.0.0.1:8888 #303

qits-kkruse opened this issue Dec 20, 2024 · 2 comments
Assignees

Comments

@qits-kkruse
Copy link

Hi,
i have been tasked with setting up the SMP-Service for my org. It went pretty smooth, we can access https://smp.qits.de/public/, it should be online right now too.

However, when i open http://smp.qits.de/ i get a redirect 302 to http://127.0.0.1:8888/public and i can't seem to find where that is configured.

I use a pretty generic snippet to connect the internet via haproxy to the server the SMP-Service is running on inside Docker. This is the internet facing frontent:

frontend peppol-smp-front
    bind 185.26.38.132:80
    bind 185.26.38.132:443 ssl crt /etc/haproxy/ssl/wildcard_qits_de.pem
    acl host_smp_qits hdr(host) -i smp.qits.de
    acl host_acc_edelivery hdr(host) -i *.acc.edelivery.tech.ec.europa.eu
    use_backend peppol-smp_backend if host_smp_qits or host_acc_edelivery

And this connects to the Docker server, pretty easy i think:

backend peppol-smp_backend
    option httpchk
    http-request set-header X-Forwarded-Host %[req.hdr(host)]
    http-request set-header X-Forwarded-Server %[req.hdr(host)]
    http-request add-header X-Forwarded-For %[src]
    http-request set-header Host %[req.hdr(host)]
    server qpeppol-test01 192.168.207.6:8888 check

This is based on the example nginx-config https://github.com/phax/phoss-smp/wiki/nginx. I doubt it has to be changed, seems easy enough and works with /public/.

So the question is this, where do i configure the target for the 302 redirection from http://smp.qits.de/ to http://127.0.0.1:8888/public?

Happy holidays :-)

@phax phax self-assigned this Dec 20, 2024
@phax
Copy link
Owner

phax commented Dec 20, 2024

Hi @qits-kkruse
First of all hello. Second of all: don't use https for your SMP. According to the Peppol SMP specification 1.3.0, chapter 5.1 you MUST NOT use https for your SMP. If you don't use the SMP for Peppol, just let me know.

Usually when running behind a reverse proxy I recommend to set the properties smp.forceroot to true and smp.publicurl to smp.qits.de. When this is set, the 302 to /public will forward to smp.publicurl/public

@qits-kkruse
Copy link
Author

qits-kkruse commented Dec 23, 2024

Morning,

thanks for your time. :-)

don't use https for your SMP

Got it, thanks.

set the properties smp.forceroot to true and smp.publicurl to smp.qits.de

I'll give this a try next year and report back, thanks again.

Cheers,
Karsten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants