Ubuntu 12.10虚拟主机

时间:2014-05-29 17:42:13

标签: ubuntu apache2 virtualhost

您好我已尝试在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>

我该怎么办?

1 个答案:

答案 0 :(得分:0)

我在/etc/hosts127.0.0.1 portal

中添加了

并使其适用于:

Apache 2.2

Order allow,deny
Allow from all

Apache 2.4

Require all granted
Satisfy Any