[英]How to change DocumentRoot to local directory in XAMPP VM?
I have used XAMPP on Windows. 我在Windows上使用过XAMPP。 There I could easily change the DocumentRoot in httpd.conf
to a local folder, like C:\\mysite
. 在那里,我可以轻松地将httpd.conf
的DocumentRoot更改为本地文件夹,例如C:\\mysite
。
However, I can't get it to work with XAMPP VM for macos. 但是,我无法使其与XAMPP VM for macos一起使用。 I tried to edit the httpd.conf
when /opt/lampp
is mounted and restart the server but it did not work. 挂载/opt/lampp
时,我尝试编辑httpd.conf
并重新启动服务器,但是它不起作用。
make sure your config looks like this 确保您的配置看起来像这样
DocumentRoot "C:\mysite"
<Directory "C:\mysite">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.