Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Feb 25, 2010 11:25 am 
Offline
Senior Newbie

Joined: Thu Feb 25, 2010 11:12 am
Posts: 6
ICQ: 35969593
Website: http://mscis.org
WLM: hplsbyufan@hotmail.com
Yahoo Messenger: hplsbyufan
AOL: hplsbyufan
Location: West Valley City, UT
I am also discussing this issue with the Utah PHP Users group. You can find the discussion with the same name here:

http://uphpu.org/pipermail/uphpu/2010-February/

Just look toward the bottom for [UPHPU] Apache 2.2 mod rewrite issue. Here's what I said to open the thread:

Google searches for the entry in the error logs have not helped me resolve this. I have this on my new server:

<VirtualHost *:80>
SuexecUserGroup brasto brasto
ServerName flfn.org
ServerAlias www.flfn.org
ServerAdmin admin at flfn.org
DocumentRoot /home/brasto/www/flfn
<Directory /home/brasto/www/flfn>
Options Indexes FollowSymLinks
AllowOverride All
</Directory>
CustomLog /var/log/httpd/brasto/flfn/access_log combined
ErrorLog /var/log/httpd/brasto/flfn/error_log
# Next three lines I'll want after fixing rewrite problem:
# RewriteEngine On
# RewriteCond %{HTTP_HOST} !^flfn\.org$ [NC]
# RewriteRule ^(.*)$ http://flfn.org$1 [R=301,L]
</VirtualHost>

Don't try to see the issue on FLFN.org since the site is still on my old server. I access it by modifying /etc/hosts with the new IP until the site is working. I have mod rewrite installed, and I can verify it by uncommenting the last three lines of that vhost. That rewrite works just fine. However, if I install Wordpress or Drupal and try to turn on friendly urls, they create a .htaccess file with these lines:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

With that the whole site seems to work except I can't go to http://flfn.org/ . If I ask for http://flfn.org/index.php it works.
All friendly URLs work. In the .htaccess file, if I comment out every line except 'RewritEngine on' I still have the same problem, and can't request http://flfn.org/ without index.php. If I move the .htaccess file and put those lines in the vhost config, I get a browser error but nothing in the server error logs (not the vhost error logs or the default error logs). Here's what I get in the browser with the .htaccess info added to the vhost:

Bad Request

Your browser sent a request that this server could not understand.
Apache/2.2.3 (CentOS) Server at flfn.org Port 80

Here's what I get in the vhost error logs when I request http://flfn.org without /index.php:

[Wed Feb 24 15:05:50 2010] [error] [client 67.182.203.21] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /home/brasto/www/flfn/, referer: http://flfn.org/admin/reports/status

As you can see, I have Options FollowSymLinks set in the vhost. The .htaccess file also has Options +FollowSymLinks in it.

Any ideas? Please remember to read the other thread to see what we already tried.

_________________
Brandon Stout


Top
   
 Post subject:
PostPosted: Fri Feb 26, 2010 4:09 am 
Offline
Senior Member

Joined: Wed Oct 20, 2004 8:55 am
Posts: 120
Debian 5 - Look for index.php in conf.d/dir.conf
Code:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm


Top
   
 Post subject:
PostPosted: Fri Feb 26, 2010 4:50 am 
Offline
Senior Newbie

Joined: Thu Feb 25, 2010 11:12 am
Posts: 6
ICQ: 35969593
Website: http://mscis.org
WLM: hplsbyufan@hotmail.com
Yahoo Messenger: hplsbyufan
AOL: hplsbyufan
Location: West Valley City, UT
kangaby wrote:
Debian 5 - Look for index.php in conf.d/dir.conf
Code:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm

Thank you for your reply. I found the issue. Apparently I needed to comment out conf.d/welcome.conf .

_________________
Brandon Stout


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group