How to use linux+nginx to provide cname service?
PHP中文网
PHP中文网 2017-05-16 17:18:06
0
1
950

Scenario:
A multi-user system, on a cloud server linux+nginx+flask, the external domain name is www.abc.com, each registered user automatically generates a second-level domain name of uxxx.abc.com.

Requirements:
Some users need to use their own second-level domain names to access our services, but we do not want to let users bind IP through A records. We hope to use cname to allow users to use their own domain names www.uxxx. com cname to uxxx.abc.com to access.

How to achieve this? How to configure nginx? Does the program need to cooperate accordingly?

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
曾经蜡笔没有小新

http dns are two different things, but it doesn’t matter.

There is actually only one problem that needs to be solved here: how to get the mapping relationship between the user’s own domain name and the user name.

It is conceivable that it cannot be solved simply through the web server, because it needs to access the storage service (storage user & domain name mapping relationship). It requires a little magic such as: ngx_lua, or it can be solved at the application layer.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template