您好我已尝试在apache 2上为localhost创建虚拟主机但未成功
<VirtualHost *:80>
ServerName portal
ServerAdmin webmaster@localhost.com
DocumentRoot /var/www/portal/public
<Directory /var/www/portal/public>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
我该怎么办?
答案 0 :(得分:0)
我在/etc/hosts
行127.0.0.1 portal
并使其适用于:
Apache 2.2
Order allow,deny
Allow from all
Apache 2.4
Require all granted
Satisfy Any