我想配置vhost与www的区别,如下所示configure,但它不起作用。
<VirtualHost *:80>
ServerAdmin com.dev
DocumentRoot "Applications/AMPPS/www/com/public"
ServerName com.dev
ErrorLog "/private/var/log/apache2/com.dev-error_log"
CustomLog "/private/var/log/apache2/com.dev-access_log" common
</VirtualHost>
这个我试着去另一个导演,但它仍然只去了localhost
<VirtualHost *:80>
ServerAdmin com.dev
DocumentRoot "/usr/docs/web/com/public"
ServerName com.dev
ErrorLog "/private/var/log/apache2/com.dev-error_log"
CustomLog "/private/var/log/apache2/com.dev-access_log" common
</VirtualHost>
主机 127.0.0.1 com.dev