Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

multidomain forward #213

Open
stefangweichinger opened this issue Jul 4, 2019 · 3 comments
Open

multidomain forward #213

stefangweichinger opened this issue Jul 4, 2019 · 3 comments

Comments

@stefangweichinger
Copy link

Situation:
2nd domain name "wp.2nd-domain.com" points to same IP as "wp.mydomain.com"

Added a mapping via https://de.wordpress.org/plugins/multiple-domain-mapping-on-single-site/

fwd works for http://wp.2nd-domain.com but not for https://wp.2nd-domain.com

ssl issues ... I assume I could edit varnish config to do the forward as well ...

wp.2nd-domain.com should just hop over to https://wp.mydomain.com and use the existing nginx plus LE-certs ...

I'd like to avoid reapplying the ansible-role ;-)

@stefangweichinger
Copy link
Author

I edited /etc/nginx/sites-enabled/varnish.mydomain.com.conf and added a block for the 2nd domain.
So far not very successful ...

@carlalexander
Copy link
Owner

Yeah, I assume it's an SSL issue. I've never had to do anything like that nor did I design debops for that use case in mind. That said, I know that you can't do HTTPS redirects at DNS level so it's really something that the project should be able to do.

It's just a bit out of scope at the moment. I'm still working on the next release with the new version of DebOps.

At a glance, you'd need to create a new PKI realm for wp.2nd-domain.com and generate a let's encrypt certificate for it. But you also need to have nginx configured to respond to the challenge so it might not be as simple as just copying the nginx configuration.

Sorry I can't be of more help

@stefangweichinger
Copy link
Author

stefangweichinger commented Jul 8, 2019

I think it should be enough to get the varnish-vhost-file right. I already have generated a cert for the 2nd domain and think of defining a 2nd https-server for that domain and let it forward to the primary vhost then. But I am not yet there ... still fiddling.

edit: maybe I should turn around things. Customer wants WP into a docker container, so using your role won't last long anymore ;-) and there I don't have varnish ... and will have to solve it via HAproxy etc

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

No branches or pull requests

2 participants