看板 PHP 關於我們 聯絡資訊
打擾了各位先進 小弟想要新增一個虛擬主機到 /home/user/example 但是似乎是失敗了,也不知道怎樣算是新增成功。 以下是新增的作法 在/apache2/sites-available下新增example.conf 以下為檔案內容 <VirtualHost *:80> ServerAdmin webmaster@example 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> -------------------------------------------------- /home/user/example跟裡面index.php的own user, grp www-data, mod 755 都一樣 結果 a2ensite enabled apache2 也restart OK 不曉得怎樣才算是新增成功,也不知道要輸入什麼網址去跑example下的index.php 谷歌兩天了還是無法成功,所以想請問一下有什麼其他的建議..... -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 182.235.169.247 ※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1423303185.A.08D.html ※ 編輯: olop (182.235.169.247), 02/07/2015 18:01:09
serotw: 對應網址或IP~若是在本機測試~設定設另一組IP對應即可 02/07 18:44
serotw: <VirtualHost *:80>改<VirtualHost 192.168.1.2:80> 02/07 18:45
serotw: 對應外部網址改<VirtualHost xxx.com.tw:80> 02/07 18:46
serotw: 不同網址或IP對應不同的目錄~Google搜尋有一推教學跟說明 02/07 18:47
olop: *替代成ip就可以了 感謝回答.... 02/07 18:56