Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-09-2012, 04:56 AM   PM User | #1
hanpedro
New Coder

 
Join Date: Jun 2005
Posts: 89
Thanks: 18
Thanked 0 Times in 0 Posts
hanpedro is an unknown quantity at this point
403 error under mod_rewrite and .htaccess

I have a 403 error under mod_rewrite and .htaccess.


The httpd error log message is,

Quote:
/var/www/html/usersite/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
And the setting of mod_rewrite is this.

At httpd.conf,

Code:
DocumentRoot "/var/www/html"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "/var/www/html">
    Options FollowSymLinks ExecCGI Includes

    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
At httpd-vhosts.conf,

Code:
<VirtualHost *:80>
ServerAdmin webmaster@server2.net
DocumentRoot /var/www/html/usersite
ServerName usersite.dyndns.org
ServerAlias www.usersite.dyndns.org
  <Directory /var/www/html/usersite/>
  AllowOverride all
  </Directory>
#php_admin_flag allow_url_fopen On
CustomLog "|/opt/lampp/bin/rotatelogs /opt/lampp/logs/usersite.dyndns.org_access_log.%Y-%m-%d 86400 +540" common
ErrorLog "|/opt/lampp/bin/rotatelogs /opt/lampp/logs/usersite.dyndns.org_error_log.%Y-%m-%d 86400 +540" 
</VirtualHost>
At .htaccess,

Code:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteRule ^([a-zA-Z0-9_]+)$ blog/index\.php\?mb_id=$1
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)$ blog/index\.php\?mb_id=$1&id=$2
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/([0-9]+)/([0-9]+)$ blog/index\.php\?mb_id=$1&yyyy=$2&mm=$3&dd=$4
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/([0-9]+)$ blog/index\.php\?mb_id=$1&yyyy=$2&mm=$3
</IfModule>
Please let me know what I am wrong.

Thanks in advance.
hanpedro is offline   Reply With Quote
Old 08-10-2012, 04:22 AM   PM User | #2
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,604
Thanks: 2
Thanked 399 Times in 392 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
Check the permissions on the /var/www/html/usersite/.htaccess file. The error message you posted says specifically that it can't be read, so the read permissions may have been removed or the user apache is running as doesn't have access to the file.
Inigoesdr is offline   Reply With Quote
Old 05-07-2013, 10:47 AM   PM User | #3
hanpedro
New Coder

 
Join Date: Jun 2005
Posts: 89
Thanks: 18
Thanked 0 Times in 0 Posts
hanpedro is an unknown quantity at this point
Inigoesdr/

I appreciate your kindness.
hanpedro is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:19 PM.


Advertisement
Log in to turn off these ads.