我正在尝试设置 PhpPgAdmin。但服务无法启动。
当我得到以下输出时sudo systemctl status httpd.service
:
● httpd.service - Apache Web Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-04-14 12:05:14 CDT; 1s ago
Process: 31293 ExecStart=/usr/bin/httpd -k start -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 31293 (code=exited, status=1/FAILURE)
Apr 14 12:05:14 ardc-pc systemd[1]: Started Apache Web Server.
Apr 14 12:05:14 ardc-pc httpd[31293]: AH00526: Syntax error on line 10 of /etc/httpd/conf/extra/phppgadmin.conf:
Apr 14 12:05:14 ardc-pc httpd[31293]: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
Apr 14 12:05:14 ardc-pc systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 12:05:14 ardc-pc systemd[1]: httpd.service: Failed with result 'exit-code'.
这是我的 phppgadming.conf 文件:
Alias /phppgadmin "/usr/share/webapps/phppgadmin"
<Directory "/usr/share/webapps/phppgadmin">
DirectoryIndex index.php
AllowOverride All
Options FollowSymlinks
Require all granted
# phppgadmin raises deprecated warnings that lead
# to parsing errors in JS
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
</Directory>
就像PhpPgAdmin说应该是。
我正在运行 Arch Linux。我安装了php,Apache HTTP 服务器一切正常,我看到我的索引页本地主机。但是当我将配置文件添加到PhpPgAdmin服务器停止。我做错了什么?
答案1
我知道问题出在哪里了。
正如维基百科页面所述Apache HTTP 服务器我需要安装 PHP 扩展。按照说明操作,一切正常!