Re: [請益] Apache 新增虛擬主機

看板PHP作者 (林班西)時間10年前 (2015/02/07 20:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
提供另一種作法 suco vim /etc/hosts 127.0.0.1 exam.ple # 新增這一行 example.conf: <VirtualHost *:80> ServerAdmin webmaster@example ServerName exam.ple DocumentRoot /home/user/example <Directory /home/user/example> Options all AllowOverride all Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> 只要紫色的字串有對到 你在網址列輸入 http://exam.ple 就可以連到這個虛擬網站了 -- 按了 esc :wq 沒反應,才發現是在批踢踢 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 49.158.202.35 ※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1423312376.A.C6A.html
文章代碼(AID): #1KrWNung (PHP)
文章代碼(AID): #1KrWNung (PHP)