简体   繁体   English

将mac xampp htdocs更改为SDcard?

[英]change mac xampp htdocs to SDcard?

I got a MAC. 我有一个MAC。 I installed XAMPP as I did in Windows. 我像在Windows中一样安装XAMPP。 It works. 有用。 But how do I change the htdocs folder to the SDcard? 但是,如何将htdocs文件夹更改为SDcard?

I opened the Applications/XAMPP/xamppfiles/etc/httpd.conf found the DirectoryRoot line Tried to change as follow: 我打开了Applications / XAMPP / xamppfiles / etc / httpd.conf,发现DirectoryRoot行尝试更改如下:

<Directory "/Volumes/SDcard/xampp/htdocs">
<Directory "/SDcard/xampp/htdocs">

both settings keep showing "Access forbidden!" 两种设置都始终显示“禁止访问!” but the folder info said "You can read and write" 但是文件夹信息显示“您可以读写”

then I add a symbolic link in Applications/XAMPP/ 然后在Applications / XAMPP /中添加一个符号链接

ln -s /Volumes/SDcard/xampp/htdocs ./htdocs-sdard

and change the httpd.conf again 并再次更改httpd.conf

<Directory "/Applications/XAMPP/xamppfiles/htdocs-sdcard">

it does not work either. 它也不起作用。 same error page 相同的错误页面

Any ideas? 有任何想法吗?

I also want to change the MySQL folder to SDcard too..... :( 我也想将MySQL文件夹也更改为SDcard ..... :(

I just found I need to change DocumentRoot too. 我只是发现我也需要更改DocumentRoot。

DocumentRoot "/Volumes/SDcard64G/xampp/htdocs" 
<Directory "/Volumes/SDcard64G/xampp/htdocs"> 

Now it works 现在可以了

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

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