LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


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

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


Hello.

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:
Code:
# 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]

</IfModule>

# 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, 06:33 PM   #2
Mogget
Member
 
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.
 
  


Reply



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 01:31 PM
LXer: How To Set Up WebDAV With Apache2 On Debian Lenny LXer Syndicated Linux News 0 05-13-2009 05:41 PM
Gthumb does not display any file anymore (Debian Lenny) jlinkels Linux - Software 3 10-15-2008 01:33 PM
Need to work out rewrite rules with proxy-balance mago Linux - Server 0 03-10-2008 06:56 PM
Apache2 mod vhost_alias - problems with .htaccess mod rewrite d_t_baker Linux - Server 1 08-16-2007 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:19 AM.

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