国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > Apache > 正文

開啟Apache mod

2024-08-27 18:24:06
字體:
來源:轉載
供稿:網友
這篇文章主要介紹了如何開啟Apache mod_rewrite模塊,需要的朋友可以參考下 啟用mod_rewrite模塊
在conf目錄的httpd.conf文件中找到
LoadModule rewrite_module modules/mod_rewrite.so
將這一行前面的#去掉。
2.在要支持url rewirte的目錄啟用 Options FollowSymLinks和AllowOverride All
Alias /php "c:/web/php/"
復制代碼 代碼如下:
<Directory "c:/web/php/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

這樣通過http://localhost:8080/php/訪問時,/php/和其下面的子目錄將支持url rewrite。

后記:php100.com
網上的很多文章并沒有提到要使用 Options FollowSymLinks,因為在httpd.conf中有
復制代碼 代碼如下:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
</Directory>

這樣如果你的網站配置成通過http://localhost:8080/來訪問,就不會注意到Options FollowSymLinks的影響,只需要將AllowOverride None改為AllowOverride All即可。而我習慣于在本機配置成http://localhost:8080/php/,忘了加Options Indexes FollowSymLinks就成功不了,會顯示
Forbidden
You don't have permission to access /php/f2blog/ on this server.
這樣的錯誤。后來還是在apache文檔中找到了原因
Note: To enable the rewriting engine for per-directory configuration files you need to set ``RewriteEngine On'' in these files and ``Options FollowSymLinks'' must be enabled. If your administrator has disabled override of FollowSymLinks for a user's directory, then you cannot use the rewriting engine. This restriction is needed for security reasons.
實際上mod_rewrite是針對目錄的,因此并不需要將httpd.conf中的所有AllowOverride None改為AllowOverride All,Options也一樣。
BTW:看來首先是要看程序提供的文檔,但是tomcat5.0.28的文檔我幾乎都看了,也沒有看到說到底能不能通過service.bat在windows上安裝成功服務。倒是看到N多人和我一樣的疑問卻沒有答案,嗯,我當然知道通過tomcatxx.exe能安裝成功tomcat服務,看來只有這一條路了。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 渝中区| 东乡| 唐海县| 历史| 会理县| 崇左市| 嫩江县| 枞阳县| 江孜县| 阿拉尔市| 阳东县| 桓仁| 屏东县| 恭城| 普兰县| 莱芜市| 新郑市| 嘉义市| 日土县| 祁阳县| 长汀县| 铁岭县| 子洲县| 泰安市| 苍溪县| 兴国县| 边坝县| 张家界市| 肇庆市| 沙湾县| 永宁县| 达尔| 偏关县| 石林| 保亭| 汉川市| 新竹县| 潞城市| 黄梅县| 新兴县| 合江县|