php - 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.
解决方案
推荐阅读
- android - 使用 android 应用程序 kotlin 在 Firestore 中重复的请求
- configuration-files - 为 Deno 发布包时忽略文件
- hyperledger-fabric - 为什么我在织物块(.json)中看不到订单的(筏)签名
- javascript - VueJs emit('input') 触发 2 个值
- git - 撤消 git add 最简单的方法是什么
- docker - 不依赖主机头的 docker 反向代理?
- c - 为什么我的 scanf 函数被跳过了?
- python - 为什么在使用 FastAPI 上传图像时出现“无法处理的实体”错误?
- javascript - 在 CSS3 multicol 中,是否可以选择单个列?
- c++ - 我怎样才能在 JUCE 项目中“去定义”?