方法
一、進入apache的conf目錄 ,修改httpd.conf
1、找到 #documentroot "d:/program files/apache software foundation/apache2.2/htdocs"這一行,意思是預設專案目錄,修改為自己專案所在目錄
2、改了上面的配置是訪問不了的,新增該目錄的訪問許可權,
f:/workspaces/php/huxiu">
options indexes followsymlinks includes
allowoverride none
order allow,deny
allow from all
directoryindex blog_index.php default.php index.html
方法二:修改httpd.conf
1、找到 # virtual hosts這一行
2、將# include conf/extra/httpd-vhosts.conf前面的「#」去掉
3、開啟apache目錄下apache2.2\conf\extra\httpd-vhosts.conf檔案,新增下面的訪問許可權:
f:/workspaces/php/huxiu">
options indexes followsymlinks includes
allowoverride none
order allow,deny
allow from all
directoryindex blog_index.php default.php index.html
apache2 2 盜鏈問題
先來介紹乙個http請求頭 叫 b referer b 通過下面這句可以取到他的值 code string referer request.getheader referer code referer是幹什麼的呢?referer可簡單的理解為記錄了上乙個頁面的url,直接從url訪問乙個頁面時它的r...
Apache2 2快取配置
參見原文 url mod expires可以減少10 左右的重複請求,讓重複的使用者對指定的頁面請求結果都cache在本地,根本不向伺服器發出請求。loadmodule expires module modules mod expires.so expiresactive on expiresbyt...
apache2 2多網域名稱繫結
apache2.2多網域名稱繫結不同目錄,將 放在httpd.conf最後 namevirtualhost 80 servernamewo.com serveralias domain.tld domain.tld documentroot www domain servernamewozine.c...