1
我嘗試在我的ubuntu系統上設置虛擬主機。但它總是打開默認的DocumentRoot而不是聲明的根。虛擬主機總是以localhost身份運行
/etc/apache2/sites-available/falkdev.conf:
<VirtualHost *>
ServerName falk.dev
ServerAdmin [email protected]
DocumentRoot "/home/falk/Arbeit/senseless/operativ/"
# DocumentRoot /var/www
<Directory "/home/falk/Arbeit/senseless/operativ/">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
/etc/hosts文件:
127.0.0.1 localhost
127.0.1.1 Thinki
127.0.0.1 falk.dev
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
如果我現在請falk.dev那麼它的導演到/ var/www/instead/home/falk/Arbeit/senseless/operativ。怎麼了?
我現在可以調用sd.dev或foo.dev,並且總是進入/ var/www /。
我也有phpStorm運行,它會打開與builtinserver全成網頁在localhost:63342