Criando subdominios via código PHP

Olá. Gostaria de saber como criar subdomínios ( ) através de script php junto a digital ocean. Já procurei no google e não encontrei nada ainda. Utilizo o Ubuntu 16.04.32 com webmin.

Obrigado desde já.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


Google Translate:

Para crear un subdominio, necesitará utilizar Webmin directamente. A menos que Webmin proporcione una API que se pueda usar con PHP, necesitará hacerlo manualmente a través del panel de control.

Si no está familiarizado con la configuración de Apache, probablemente recomendaría usar VestaCP como un panel de control alternativo (y gratuito), ya que ofrece un poco más de funcionalidad y es un poco más fácil de usar.

Dicho esto, al igual que con cualquier panel de control, si necesita funcionalidad personalizada, necesitaría escribir código o contratar a un programador para que lo haga por usted, ya que a menudo hay cierto grado de complejidad cuando se trata de trabajar con API y obtener tareas para Corran como se esperaba

To create a sub-domain, you’d need to use Webmin directly. Unless Webmin provides an API that can be used with PHP, you’d need to do it manually through the control panel.

If you’re not overly familiar with Apache configuration, I would probably recommend using VestaCP as an alternative (and free) control panel as it offers a bit more functionality and it’s a bit easier to use.

That being said, as with any control panel, if you need custom functionality, you’d need to write code or hire a programmer to do it for you as there’s often some degree of complexity when it comes to working with API’s and getting tasks to run as expected.

If you were to write your question in English, a lot more people would be able to help.