我使用的是ubuntu 13.10 OS和LAMP,Apache 2.4。如何在ubuntu中創建一個虛擬主機13.10
我想在apache上創建一個虛擬主機。我嘗試了一些代碼,但沒有奏效。
進行了以下修改。但它不起作用。
首先我將HostnameLookups off
更改爲HostnameLookups on
對etc\apache2\apache2.conf
文件。然後,我添加了下面的代碼,
<VirtualHost *:80>
ServerName local.scholarships.theiet.in
DocumentRoot /home/www/my_project/public_html
<Directory path_to_code_base/public>
Options -Indexes
Require all granted
DirectoryIndex index.php
AllowOverride All
</Directory>
</VirtualHost>
重啓Apache後,我跑了http://localhost/
。該網站未加載。
我怎樣才能運行http://localhost/
得到錯誤而重新啓動Apache的「命令:無法初始化政策插件」 –
這是完全不同的東西 - 你上面有涉及到兩個高品質的答案你的虛擬主機問題。如果您有更多問題,請創建新帖子。 – carousel
但是爲了更有幫助,我認爲這個問題(re sudo)已經在askubuntu網站http://askubuntu.com/questions/170216/sudo-doesnt-work :-)上得到解決 – kguest