Interaction with virtual hosts in a PHP / Symfony2 application

I have a Symfony2 PHP application where each user has their own subdomain. For the time being, it just works as the default Apache host without virtual hosts. When someone accesses their subdomain, they obviously invoke the main application, which looks just like its own installation in a virtual host.

Now the application is developing, and some users need additional features, including starting their own domain aliases and installing SSL certificates on these aliases. I am also starting to think about the security of each user subdomain in the system. I think the logical step forward is to give each user their own virtual host. Ultimately, these virtual hosts must have read access to the main application, read / write access to their own download folder, and limited system resources. I am looking at CloudLinux to solve the last problem.

I am flexible as to which web server should work if it works well and is relatively secure. Can someone point me in the right direction to create a setting that allows PHP to automatically create and edit virtual hosts on a web server and create / edit SSL certificates and domain aliases?

This is not a question of a specific piece of code, but rather a question of the best overall approach.

+4
source share
1 answer

I'm not sure which application you are talking about, but since you are mentioning SSL certificates, I assume there is reasonable data .

, , (, / SSH) .

- , stackoverflow , .

(v) .

, - , ... , .

.

-, .

, - , . ( , IP-, ).

PHP/ / (.. php-fpm) ... , , (,...).

, (,...) ...

, opcode (, Zend Opcache APC) (, APCu) , - , PHP () .

symfony2 , - .

MySQL ( , ), , , .

  • ...
  • jailshells
  • jailshell'd php-
  • -
  • ...

, , php-fpm, - , php.

- - php, , , , cache-dirs (,...)).

, ... , , .

:

symfony2, / 80 $/ ... () !

+2

Source: https://habr.com/ru/post/1523433/


All Articles