1
我創建了一個虛擬主機/etc/apache2/site-available/mysite.local
與此配置:虛擬主機無法正常工作
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName mysite.local
DocumentRoot /var/www/mysite
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/mysite>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
和/etc/hosts
:
127.0.0.1 localhost
127.0.1.3 mysite.local
但是當我去mysite.local
它顯示localhost
! 有什麼問題?
我也有問題,我想有些東西需要更改爲主機文件 – asm234