2015-10-16 55 views
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

回答

0

我必須有改變apache2.conf默認seciotn和適應的路徑,我的新路徑。此外,我dissabled 000-default.conf通過

a2dissite 000-default.conf

之後,我不得不重裝了Apache。

相關問題