Apache 配置无法识别我的环境变量

Apache config doen't recognize my enviroment variables

当我尝试启动 apache 网络服务器时,它抛出一个异常,表明它无法识别 envvars 中的变量 我附上了一张图片供您查看,我相信我的 envvars 文件没问题。 对不起,如果这是新手的问题,但我是 apache 的新手。

this is the image, top part is the exception, bottom part is the envvars file

您能检查一下 "/var/run/apache2" 文件夹是否丢失了吗? 如果是,您可以尝试创建文件夹:

mkdir /var/run/apache2

之后,请运行执行以下命令:

source /etc/apache2/envvars

最后,您可以重新启动您的 Apache:

sudo systemctl stop apache2
sudo systemctl start apache2

sudo systemctl restart apache2