macos OSX 上的 XAMPP 默认文件夹

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2465655/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 06:49:15  来源:igfitidea点击:

XAMPP default folder on OSX

macosxampp

提问by niksy

Getting Started manual says I can put my files in /Applications/XAMPP/htdocs/ folder and in /Sites/ folder, but when I put files in /Sites folder it gives me this error:

入门手册说我可以将我的文件放在 /Applications/XAMPP/htdocs/ 文件夹和 /Sites/ 文件夹中,但是当我将文件放在 /Sites 文件夹中时,它给了我这个错误:

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.
Error 500
localhost
Wed Mar 17 11:29:01 2010
Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 

Is there something that needs to be changed?

有什么需要改变的吗?

Also, when I try to restart XAMPP via Terminal I get this message:

此外,当我尝试通过终端重新启动 XAMPP 时,我收到以下消息:

XAMPP: Starting ProFTPD.../Applications/XAMPP/xamppfiles/xampp: line 184: /Applications/XAMPP/xamppfiles//var/proftpd/start.err: No such file or directory
fail.
Contents of "/Applications/XAMPP/xamppfiles//var/proftpd/start.err":
cat: /Applications/XAMPP/xamppfiles//var/proftpd/start.err: No such file or directory

Does this have something to do with the installation?

这和安装有关系吗?

Thanks

谢谢

回答by kesalin

You can follow these:

你可以按照这些:

sudo mkdir /Applications/XAMPP/xamppfiles/var/proftpd/

sudo touch /Applications/XAMPP/xamppfiles/var/proftpd/start.err

sudo /Applications/XAMPP/xamppfiles/xampp fix_rights

回答by helper

have you put a file which is either index.html or index.php

你放了一个文件是 index.html 还是 index.php

if no put a index.php file in htdocs with

如果没有在 htdocs 中放置一个 index.php 文件

 <?php
    $uri= $_SERVER['HTTP_HOST'];
    header('Location: '.$uri.'/site/');
    exit;
 ?>