搜尋此網誌

顯示具有 apache 標籤的文章。 顯示所有文章
顯示具有 apache 標籤的文章。 顯示所有文章

2013年7月9日 星期二

如何啟用.htaccess的rewrite功能

1. 修改httpd.conf

找到
# LoadModule rewrite_module modules/mod_rewrite.so
把#號去掉
LoadModule rewrite_module modules/mod_rewrite.so

2. 修改httpd-vdirectory.conf

Alias /sign/ "D:/WAMP/htdocs/sign_up/"

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
# Prevent .htaccess and .htpasswd files from being viewed by Web clients.

Require all denied



3. 修改.htaccess

RewriteEngine On
RewriteBase /sign/
Options -Indexes
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)-(.*).html index.php?routing=$1&action=$2 [L,QSA,NC]

紅色粗體字為關鍵部分!
特別是如果你出現
Not Found
The requested URL /WAMP/htdocs/sign_up/index.php was not found
這種訊息時,關鍵就在於沒有設定RewriteBase!!!

2012年10月22日 星期一

Apache 2.4 與 2.2在控制存取權限上的指令大變更!


Access control
In 2.2, access control based on client hostname, IP address, and other characteristics of client requests was done using the directives Order, Allow, Deny, and Satisfy.

In 2.4, such access control is done in the same way as other authorization checks, using the new module mod_authz_host. The old access control idioms should be replaced by the new authentication mechanisms, although for compatibility with old configurations, the new module mod_access_compat is provided.

Here are some examples of old and new ways to do the same access control.

In this example, all requests are denied.

2.2 configuration:

Order deny,allow
Deny from all
     
2.4 configuration:

        Require all denied
     
In this example, all requests are allowed.

2.2 configuration:

Order allow,deny
Allow from all
     
2.4 configuration:

        Require all granted
     
In the following example, all hosts in the example.org domain are allowed access; all other hosts are denied access.

2.2 configuration:

Order Deny,Allow
Deny from all
Allow from example.org
     
2.4 configuration:

        Require host example.org

2010年6月21日 星期一

Apache Axis2/Java 弱點

由於是Server端的軟體,特別在此做個警訊:使用Apeche Axis的夥伴請儘速更新到1.5.2或1.6以後的版本。

Apache Axis2/Java XML Document Type Declaration Processing Vulnerability
Release Date 2010-06-21

Criticality level Moderately critical
Impact Exposure of system information、Exposure of sensitive information、DoS
Where From remote
Authentication level Available in Customer Area
Report reliability Available in Customer Area
Solution Status Vendor Workaround
Systems affected Available in Customer Area
Approve distribution Available in Customer Area
Software:
Apache Axis2/Java 1.x

CVE Reference(s) CVE-2010-1632 CVSS available in Customer Area

Description
A vulnerability has been reported in Apache Axis2/Java, which can be exploited by malicious people to disclose system information or potentially sensitive information and cause a DoS (Denial of Service).

The vulnerability is caused due to Axis2 not properly restricting the processing of XML Document Type Declarations (DTD). This can be exploited to e.g. determine the existence or include contents of local and potentially external files by including them as a DTD reference or cause a DoS due to CPU or memory consumption by providing e.g. a heavily nested DTD.

The vulnerability is reported in version 1.4.1 and 1.5.1. Prior versions may also be affected.

Solution
Apply patch and update to version 1.5.2 or 1.6 as soon as available. See vendor's advisory for additional details.

Original Advisory
https://svn.apache.org/repos/asf/axis/axis2/java/core/security/CVE-2010-1632.pdf
https://issues.apache.org/jira/browse/AXIS2-4450

2010年3月10日 星期三

用Windows跑Apache的請注意漏洞修補

Apache是一個免費的網頁伺服器軟體,支援許多作業系統平台,裝上它就可以提供網站的服務。

最流行的幾個版本包括1.3、2.0、2.2。其中2.0與2.2系列,最近都出現重大漏洞,如果是在Windows平台安裝的話,可能會遭到服務癱瘓(DDoS)或被執行惡意程式的問題。

2.2系列的請升級到2.2.15版。參考網址。

2.0系列的請考慮使用2.0.64-dev版。參考網址。