Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-10-2010, 01:26 PM   #1
Registered: Dec 2008
Location: Norway
Distribution: Debian
Posts: 43

Rep: Reputation: 15
Debian, Lenny, suEXEC, Apache2, .htaccess rewrite rules don't work anymore.


What is wrong: First page on my sites work, but when trying to enter other pages i get this error: The requested URL /somelink/ was not found on this server. 404 Not found.
There are no errors in suEXECs log file, but Apaches error logfile tells me that the page does not exist, same as what the browser is telling me.

I want to point out that this setup worked perfectly before implementing suEXEC. I now have suEXEC working and all .php code is now run as the user instead of "www-data".

The problem is that the .htaccess file in public_html directory is not read. I am assuming this is the problem since i have some ErrorDocument statements in those exact files which worked nicely before the installation of suEXEC.

The .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress

ErrorDocument 404 /error_pages/error_404.html
ErrorDocument 403 /error_pages/error_403.html
ErrorDocument 401 /error_pages/error_401.html
The files has 664 permissions with the user and group of the sites as owner.

Any suggestions to how to solve this? Is my .htaccess file now redundant or am i missing some important information? Any help would be appreciated as my goggling just made me more stumped on the problem.
Old 07-10-2010, 07:33 PM   #2
Registered: Dec 2008
Location: Norway
Distribution: Debian
Posts: 43

Original Poster
Rep: Reputation: 15
Hello again, after some hours of studying this problem i solved it myself.
When writing my /etc/apache2/sites-avalable/mysite.conf i turned of AllowOverride, meaning i did AllowOverride None inside the directory tabs. This makes it so .htaccess is not read or written as needed.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Chrooting Apache2 With mod_chroot On Debian Lenny LXer Syndicated Linux News 0 04-15-2010 02:31 PM
LXer: How To Set Up WebDAV With Apache2 On Debian Lenny LXer Syndicated Linux News 0 05-13-2009 06:41 PM
Gthumb does not display any file anymore (Debian Lenny) jlinkels Linux - Software 3 10-15-2008 02:33 PM
Need to work out rewrite rules with proxy-balance mago Linux - Server 0 03-10-2008 07:56 PM
Apache2 mod vhost_alias - problems with .htaccess mod rewrite d_t_baker Linux - Server 1 08-16-2007 08:32 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration