ubunru 虛擬主機 VirtualHost 設定
虛擬主機 VirtualHost
最主要的目的是 讓一台server 一個IP 的情況下 可以直接運作多個網站
在ubuntu server 預設的情況下 就是使用VirtualHost
以下是執行指令
#cd /etc/apache2/sites-available
#cp default [第二個網站網址]
#vim [第二個網站網址]
修改和增加下列資訊
        ServerAdmin [email protected]
	        ServerName  [第二個網站網址]
        DocumentRoot /home/pupuliao/web/ownCloud/
	        <Directory [第二個網站存放位置] >
	                Options Indexes FollowSymLinks MultiViews
	                AllowOverride None
	                Order allow,deny
	                allow from all
	        </Directory>
#cd ..
#vim apache2.conf
增加一條 ServerName 127.0.0.1:80
#a2ensite [第二個網站網址]
# /etc/init.d/apache2 reload
收工





Leave a Reply