2012-06-03 55 views
0

我正在尋找在Ubuntu中設置通配符虛擬主機。我已經很容易地設置了WAMP設置,但我對Linux知之甚少,不知道設置有何不同。通配符虛擬主機Ubuntu

我們的目標是能夠創建文件夾一樣:不必每次添加單個虛擬主機

site.weblocal 
site2.weblocal 
site3.weblocal 
etc..... 

。有人推薦dnsmasq?

任何提示將不勝感激:)

+0

「有人推薦的dnsmasq」而你看着的dnsmasq?有沒有足夠的理由? – Kevin

回答

3

對Ubuntu它去那麼簡單,

sudo apt-get install dnsmasq 
sudo echo "address=/weblocal/127.0.0.1" >> /etc/dnsmasq.d/weblocal 
sudo /etc/init.d/dnsmasq restart 
3

命令和apt-get安裝的dnsmasq

須藤gedit中/etc/dnsmasq.conf

添加此行「address = /。weblocal/127.0.0.1」

以下

須藤服務的dnsmasq重啓ñ重啓的dnsmasq使用

+0

我使用的是Ubuntu 16.04,它不起作用 –