Apache ErrorDocument问题

时间:2014-02-07 14:03:38

标签: apache .htaccess

我正在尝试创建自己的403页面,但我的apache无法正常工作。 我用

ErrorDocument 403

但它显示相同。这是我的.htaccess:

# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
    Order Deny,Allow
    Deny From All
</Files>
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]

以下是我的主机设置:

<VirtualHost 127.0.1.15:80>
ServerAdmin webmaster@localhost
ServerName turik.loc
ServerAlias *.turik.loc

DocumentRoot /home/golars/proj/turik/

<Directory />
    Options FollowSymLinks MultiViews
    AllowOverride All
</Directory>

<Directory /home/golars/proj/turik/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Order allow,deny
    Allow from all
        Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/t4base_error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

到403错误我要去turik.loc / img / hotels / - 我没有权限阅读和写。我会优雅地寻求帮助。

0 个答案:

没有答案