What does it take to use Surfer as a “real” multidomain surfer?
-
I think what you really want here is a location rewriting reverse proxy. Maybe apache mod_rewrite using the lamp app would work here. Given the generic nature of (sub)domains mapping to paths, I guess in the end everything ends up as a hack unless there is a proper regular expression syntax supported.
(a propery reverse proxy is required as unlike that
remithack, you also need to handle all HTTP verbs like POST, PUT,.... as well as dealing at least with header and status code forwarding) -
I think what you really want here is a location rewriting reverse proxy. Maybe apache mod_rewrite using the lamp app would work here. Given the generic nature of (sub)domains mapping to paths, I guess in the end everything ends up as a hack unless there is a proper regular expression syntax supported.
(a propery reverse proxy is required as unlike that
remithack, you also need to handle all HTTP verbs like POST, PUT,.... as well as dealing at least with header and status code forwarding) -
One could also do it in the reverse, but having your Surfer app with several sites in subfolders, then install an App Proxy for each subfolder.
The issue is you now have a lot of App Proxies in your dash which is just like all the Surfer apps..
Since we don't have better control over the Cloudron reverse proxy, having more features in the App Proxy would make sense.
@nebulon what do you think about bringing it into the Services section of Cloudron which would allow us to add an arbitrary number of proxy records all in one place?
Or it could filter down into the Location section of App Config with Aliases and Redirects, which could then support ports and paths.
-
I think it is possible to write a simple nodejs app which handles the proxy.
One surfer instance, one nodejs app in it started on launch, multiple folders/sites. -
Not sure you even need that, as I recall writing some JS for a list of redirects based on the incoming request which could send you anywhere else as part of the index.html on a Surfer App.
The main issue I think was URL cloaking so the address bar doesn't change, while the content of the page does.
-
Am I hallucinating or did I read somewhere that Surfer would get multi-domain functionality ?
If hallucinating, ignore me. -
@timconsidine thanks for the reminder
I posted a follow up at https://forum.cloudron.io/topic/16009/surfer-v7-new-cli-deploys-app-passwords/5 -
Great. 75% done.
What’s still missing? Redirecting to the correct domain.Current setup:
Location = default location
Aliases = match the site configuration in Surfer
Redirects = redirect to the locationFor a “real” multi-domain app, I need configuration options for this typical use case:
www.example.org
www.example.comexample.org redirects to www.example.org, and example.com redirects to www.example.com. As I understand it, that’s currently not possible.
-
right, redirects are platform feature, so the app doesn't even know about them . A workaround for now is to move the redirects as aliases instead and set up redirects manually inside surfer.
I think if we want to make this truly truly multidomain, we have to simply merge surfer into the platform itself (instead of trying to make surfer more multidomain).
edit: then again, maybe we just need a simple redirects configuration in site configuration .
-
Aliases are working fine for me currently.
Moved 10 of my individual Surfer deployments into a single Surfer with the Site facility.
I haven't found a "smart" may to move content : I just download the individual deployment public folder, then uninstall the deployment, then create the alias and the site in the multi-domain deployment and re-upload the files from individual public dir into the new location. Manual but it gives me the chance to review/curate as I go.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login