我已在 macOS Mojave 上安装了 XAMPP。当我运行此命令“sudo /Applications/XAMPP/xamppfiles/xampp start”时
我收到以下错误:
启动 Mac OS X 7.2.10-0 的 XAMPP... XAMPP:启动 Apache...好的。 XAMPP:启动 MySQL...好的。 XAMPP:启动 ProFTPD...失败。 “/Applications/XAMPP/xamppfiles/var/proftpd/start.err”的内容: Mudasars-MacBook-Pro.local proftpd[4057]:警告:无法确定“Mudasars-MacBook-Pro.local”的 IP 地址 Mudasars-MacBook-Pro.local proftpd[4057]:错误:未配置有效服务器 Mudasars-MacBook-Pro.local proftpd[4057]:致命:处理配置文件“/Applications/XAMPP/xamppfiles/etc/proftpd.conf”时出错
我的proftpd.conf文件:
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "daemon" and "ftp" for normal operation and anon.
ServerName "ProFTPD"
ServerType standalone
DefaultServer on
# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30
# Set the user and group that the server normally runs at.
User daemon
Group admin
# Normally, we want files to be overwriteable.
<Directory /Applications/XAMPP/xamppfiles/htdocs/*>
AllowOverwrite on
</Directory>
# only for the web servers content
DefaultRoot /Applications/XAMPP/xamppfiles/htdocs
<Limit SITE_CHMOD>
DenyAll
</Limit>
# daemon gets the password "xampp"
UserPassword daemon 2TgxE8g184G9c
# daemon is no normal user so we have to allow users with no real shell
RequireValidShell off
# daemon may be in /etc/ftpusers so we also have to ignore this file
#to login with "OSX Users"
AuthPAM on
AuthPAMConfig ftpd
UseFtpUsers off
有人知道如何解决这个问题吗?
谢谢
请尝试添加:
127.0.0.1 Mudasars-MacBook-Pro.local
到您的
/etc/hosts
文件并重试
要修复该错误,您应该尝试以下步骤:
检查 ProFTPD 配置文件 (/Applications/XAMPP/xamppfiles/etc/proftpd.conf) 并确保“DefaultRoot”目录存在并设置为有效路径。 检查“DefaultRoot”指令中设置的目录的权限,以确保运行 ProFTPD 的用户(本例中为守护程序)具有读取和执行访问权限。 确保配置文件中的“用户”和“组”指令设置为有效值,并且运行 ProFTPD 的用户有权访问指定目录。 如果问题仍然存在,您可以尝试重新安装 XAMPP 或查阅 XAMPP 支持文档以获取进一步的故障排除指南。 注意:警告信息“无法确定'Mudasars-MacBook-Pro.local'的IP地址”可能是由于DNS解析问题造成的,但似乎与ProFTPD启动失败没有直接关系。
在终端上输入 sudo nano /etc/hosts