首页 > 解决方案 > Nginx virtual host - Create and modify using PHP

问题描述

I would like to create and modify the Nginx conf file/virtual host using PHP dynamically. I also need to run some Nginx commands like reload/refresh, so I am currently using shell_exec function and run shell commands. But I am getting a permission error. The error might be fixed when I give ownership for www-data. Is this considered to be a big security issue? Is there any other solution for this?

Thank you.

标签: phpnginxshell-exec

解决方案


推荐阅读