简体   繁体   English

Laravel Forge 是否提供域公园 API?

[英]Does Laravel Forge provide Domain Park API?

I am creating Multi-tenant website using Laravel.我正在使用 Laravel 创建多租户网站。

Does Laravel forge provide domain mapping API? Laravel forge是否提供域映射 API?

I would like to let users use their own domain instead of our subdomain.我想让用户使用他们自己的域而不是我们的子域。

For example: user will get subdomain in our website.例如:用户将在我们的网站中获得子域。

https://username.mywebsite.com

And if he has his domain userdomain.com, he will be able to change CNAME in domain registrar so that he can use his own domain instead of our website subdomain.如果他有他的域 userdomain.com,他将能够在域注册商中更改 CNAME,以便他可以使用自己的域而不是我们的网站子域。

And also on my side, I will need to park that domain on the my project domain.而且在我这边,我需要将该域停放在我的项目域中。

https://username.mywebsite.com // subdomain of our website.
https://userdomain.com // user's own domain

For now, I am using Cpanel API to park user's domain on our website.目前,我正在使用Cpanel API将用户的域停放在我们的网站上。

I am quite new on laravel forge and if there is the way to park domain using laravel forge API, it will be great.我对 laravel forge 很陌生,如果有办法使用 laravel forge API 来停放域,那就太好了。

Any suggestion would be highly appreciated.任何建议将不胜感激。

This is not possible directly from the Forge UI.这不能直接从 Forge UI 中实现。

However, you could comfortably create a new alias for each new client via the API, specifically the update site endpoint: https://forge.laravel.com/api-documentation#update-site但是,您可以通过 API 轻松地为每个新客户端创建一个新别名,特别是update site端点: https://forge.laravel.com/api-sitedocumentation

Just be mindful you will need to pass the full list of aliases each time, including your mywebsite.com domain.请注意,您每次都需要传递完整的别名列表,包括您的mywebsite.com域。 This can easily be done by fetching the site first.这可以通过首先获取站点来轻松完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM