安装并设置dnsmasq / apache vhosts,localhost说,“无法访问此站点”。遵循这些教程https://mallinson.ca/osx-web-development/,https://mallinson.ca/osx-web-development/
NameVirtualHost *:80
UseCanonicalName Off
httpd-vhosts.conf
LogFormat "%V %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"" dynamic_vhosts
CustomLog /var/log/apache2/access_log dynamic_vhosts
<VirtualHost *:80>
ServerName localhost
VirtualDocumentRoot /Users/jharri34/Sites/%0
<Directory "/Users/jharri34/Sites">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName localhost
</VirtualHost>
答案 0 :(得分:0)
我认为您应该将此行添加到httpd-vhosts.conf
:
<VirtualHost *:80>
ServerName localhost
</VirtualHost>