gpt4 book ai didi

apache - 在 Ubuntu 12.04 中启动 apache 失败

转载 作者:行者123 更新时间:2023-12-04 18:52:38 25 4
gpt4 key购买 nike

我也全新安装了 Ubuntu 12.04 和 LAMPP。

当我尝试启动/重新启动lampp时,它显示启动apache失败的消息。日志粘贴在下面。

root@cclab:~# /opt/lampp/lampp start
Starting XAMPP for Linux 1.8.3-3...
XAMPP: Starting Apache...fail.
AH00526: Syntax error on line 26 of /opt/lampp/etc/extra/httpd-xampp.conf:
order takes one argument, 'allow,deny', 'deny,allow', or 'mutual-failure'
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
root@cclab:~#

以下是显示错误的/opt/lampp/etc/extra/httpd-xampp.conf。
#<IfDefine PHP4>
#LoadModule php4_module modules/libphp4.so
#</IfDefine>
#<IfDefine PHP5>
#LoadModule php5_module modules/libphp5.so
#</IfDefine>

# We will enable it by default
#<IfDefine PHP>
LoadModule php5_module modules/libphp5.so
#</IfDefine>

LoadModule perl_module modules/mod_perl.so

Alias /phpmyadmin "/opt/lampp/phpmyadmin"
Alias /phpsqliteadmin "/opt/lampp/phpsqliteadmin"

# since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Require all granted
</Directory>

<Directory "/opt/lampp/phpsqliteadmin">
AllowOverride AuthConfig Limit
Order allow, deny
Require all granted
</Directory>

# since LAMPP 1.0RC1
AddType application/x-httpd-php .php .php3 .php4

XBitHack on

# since 0.9.8 we've mod_perl
<IfModule mod_perl.c>
AddHandler perl-script .pl
PerlHandler ModPerl::PerlRunPrefork
PerlOptions +ParseHeaders
PerlSendHeader On
</IfModule>

# demo for mod_perl responsehandler
#PerlModule Apache::CurrentTime
#<Location /time>
# SetHandler modperl
# PerlResponseHandler Apache::CurrentTime
#</Location>

# AcceptMutex sysvsem is default but on some systems we need this
# thanks to jeff ort for this hint
#AcceptMutex flock
#LockFile /opt/lampp/logs/accept.lock

# this makes mod_dbd happy - oswald, 02aug06
# mod_dbd doesn't work in Apache 2.2.3: getting always heaps of "glibc detected *** corrupted double-linked list" on shutdown - oswald, 10sep06
#DBDriver sqlite3

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Allow from all
Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

最佳答案

删除 Order Directory 中的声明指令,它们不适用于 2.4 版。

您正确拥有 Require all granted设置,这就是所有需要的。

更多信息:https://httpd.apache.org/docs/trunk/upgrading.html

关于apache - 在 Ubuntu 12.04 中启动 apache 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23013219/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com