如何为用户opon注册创建子域名 [英] How to create sub.domain for user opon sign up

查看:257
本文介绍了如何为用户opon注册创建子域名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在linux服务器上使用php / mysql。我想在注册时为每个用户创建一个用户子域。例如,john doe - > johndoe.example.com



问题是,我们将允许自定义,如为需要自定义的客户添加自定义功能。那么,更好的是我们自动化过程还是手动创建需要自定义的客户的子域,并让其他用户只需使用基本登录?



如何自动化过程if需要吗?

解决方案

而不是创建子域名,具有映射到一个文件夹的通配符子域名,并用PHP找出哪个用户的要显示的数据



如果您正在使用cPanel主机,创建通配符子域应该很简单,不需要对httpd.conf文件进行任何手动调整。否则每当您添加个别子域名时,Apache将在后台重新启动,这并不完美。



我更改了我的答案,以更清楚地了解。


I am using php/mysql on linux servers. I want to create a user sub domain for each user upon sign up. For instance, john doe --> johndoe.example.com

The issue is, we are going to allow customizations such as adding custom features for clients wanting customizations. So, is it better we automate the process or manually create sub domains for clients requiring customizations and let other users just use basic login?

And how can i automate the process if need be?

解决方案

Instead of creating subdomains, have a wildcard subdomain which is mapped into one folder and with PHP figure out which user's data you want to show.

If you are using a cPanel hosting, creating a wildcard subdomain should be pretty easy and wont require any manual adjustment to the httpd.conf file. Otherwise whenever you will add individual subdomains Apache will be restarted in the background, which is not at all good.

I rephrased my answer for clearer understanding.

这篇关于如何为用户opon注册创建子域名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆