xampp 中的域别名

Domain alias in xampp

我正在尝试放置一个名为 noetic.dev 的域别名,我在名为 noetic 的 htdocs 文件夹中进行了全新的 laravel 安装。

为了实现这一点,我尝试更改 httpd.conf 文件并添加了以下内容:

Alias /noetic.dev "F:/xamp/htdocs/Noetic/public/" 

<Directory "F:/xamp/htdocs/Noetic/public/">
  Options Indexes FollowSymLinks MultiViews
  AllowOverride all
  Require local
</Directory>

我在 httpd-vhosts.conf 中更改了以下内容:

<VirtualHost *:8082>
    ServerName noetic.dev
    DocumentRoot c:/wamp/www/NitsEdit/public
</VirtualHost>

同样,我在 hosts 文件中:

127.0.0.1       noetic.dev

现在尝试 link 时 http://localhost:8082/noetic.dev/ 我得到了结果,但是在尝试 noetic.dev:8082 时我得到了一个错误

Access forbidden: You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.

我不知道我哪里做错了,请指导我。

对于虚拟主机,您的 C:/ 路径错误

DocumentRoot c:/wamp/www/NitsEdit/public

应该是

 DocumentRoot F:/xamp/htdocs/Noetic/public/