繁体   English   中英

无法启动Apache Web服务器

[英]Failed to start Apache Web Server

我正在尝试通过Wordpress Wiki以及Apache和php-fm / mod_proxy_fcgi在Arch Linux上安装Wordpress

我通过pacman将Wordpress安装到“ / usr / share / webapps / wordpress /”

当我尝试运行“ systemctl start httpd”时,出现错误。 运行“ systemctl status httpd.service -l”输出:

httpd.service - Apache Web Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
Active: failed (Result: exit-code) since Wed 2014-11-19 03:48:11 EST; 26s ago
Process: 12633 ExecStop=/usr/bin/apachectl graceful-stop (code=exited, status=1/FAILURE)
Process: 13162 ExecStart=/usr/bin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 12463 (code=exited, status=0/SUCCESS)

systemd[1]: Starting Apache Web Server...
apachectl[13162]: AH00526: Syntax error on line 6 of /etc/httpd/conf/extra/httpd-wordpress.conf:
apachectl[13162]: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
systemd[1]: httpd.service: control process exited, code=exited status=1
systemd[1]: Failed to start Apache Web Server.
systemd[1]: Unit httpd.service entered failed state.
systemd[1]: httpd.service failed.`

“ /etc/httpd/conf/extra/httpd-wordpress.conf”包含:

Alias /testing "/usr/share/webapps/wordpress"
<Directory "/usr/share/webapps/wordpress">
        AllowOverride All
        Options FollowSymlinks
        Require all granted
        php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:$"
</Directory>

任何建议将不胜感激。

将php与fastCGI代理或PHP-FPM一起使用时,PHP运行时不再嵌入apache运行时进程中。 这将提高Apache Web服务器和PHP的性能,因为即使在请求是服务器之后,进程仍存储在彼此独立的内存中。

但这确实意味着php管理员值不再可以存储在apache配置中,就像在apache本身中运行php时可能的那样。

您可以通过添加服务器范围的open_basedir限制来添加

open_basedir = "<insert path here>" 

到您的全局php.ini文件中,该文件通常存储在/etc/php5/<runtime>/ ,其中您的运行时将是fpm,fcgid或类似的名称。

此外,如果同一服务器上有多个网站,则可以使用网站根目录中的.user.ini文件来设置PHP值。 如果允许,在.user.ini文件中设置的值将覆盖php.ini所有PHP设置(请参阅PHP手册

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM