logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: .htaccess problem
Author
mbierman



Joined: 08 Oct 2012
Posts: 5
Location: US, Palo Alto

PostPosted: Mon 08 Oct '12 22:48    Post subject: .htaccess problem Reply with quote

I was trying to set up archive-my-tweets (https://github.com/amwhalen/archive-my-tweets ) and I seem to have gotten stuck with a 403 error. When I remove the .htaccess file the 403 goes away but so do the rewrite rules so that's a problem.

You'll see the contained .htaccess file that's included in the project.

Basically for now I'm just trying to run this on my mac. I have set up the files in a subdirectory of my personal web server. The personal web server is working fine--but when I go to the /tweets directory I get the 403.

Any suggestions how to solve this? I'm an Apache novice so none of the advice I found seemed to solve the problem in this case.



Many thanks.

Michael
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7354
Location: Germany, Next to Hamburg

PostPosted: Tue 09 Oct '12 10:56    Post subject: Reply with quote

Without seeing the error log, I think the Rewrite Module isn't loaded.
Back to top
mbierman



Joined: 08 Oct 2012
Posts: 5
Location: US, Palo Alto

PostPosted: Tue 09 Oct '12 21:19    Post subject: Reply with quote

Thanks, James. Which log should I provide?

To clarify

If I don't have .htaccess I get the PHP file (no rewrite) and no 403. With .htaccess I get the 403.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7354
Location: Germany, Next to Hamburg

PostPosted: Tue 09 Oct '12 23:11    Post subject: Reply with quote

If the .htaccess causes the 403 error, than please post the content of that file
Back to top
mbierman



Joined: 08 Oct 2012
Posts: 5
Location: US, Palo Alto

PostPosted: Wed 10 Oct '12 3:01    Post subject: Reply with quote

James Blond wrote:
If the .htaccess causes the 403 error, than please post the content of that file


I have not modified the .htaccess from above.


https://github.com/amwhalen/archive-my-tweets/blob/master/.htaccess
Back to top
mbierman



Joined: 08 Oct 2012
Posts: 5
Location: US, Palo Alto

PostPosted: Fri 12 Oct '12 19:40    Post subject: ping Reply with quote

sorry to be a bother, but any thoughts on this?
Back to top
JeanLuc



Joined: 14 Oct 2012
Posts: 1

PostPosted: Sun 14 Oct '12 20:32    Post subject: Reply with quote

Hi,
I'm experiencing a pretty similar problem, so i thought I could jump right in to this thread here.
Basically the same Problem as mbierman:
Setting "AllowOverride" to "All" and having the .htaccess in my root-folder gives me 403-Forbidden
(By the way, the "website" I`m trying to host is OwnCloud.)
I looked at my error-log and saw:
Code:
[Sun Oct 14 02:02:11 2012] [error] [client 192.168.0.148] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /media/NAS/Owncloud/core/templates/404.php


...which is weird because I thought I did set the option FollowSymlinks
The config of the dir looks like this /etc/apache2/sites-enabled/my-config-file
Code:
<Directory /media/NAS/Owncloud>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Order allow,deny
  allow from all
</Directory>


and this is how the .htaccess looks like:
Code:

ErrorDocument 403 /core/templates/403.php
ErrorDocument 404 /core/templates/404.php
<IfModule mod_php5.c>
php_value upload_max_filesize 512M
php_value post_max_size 512M
php_value memory_limit 512M
<IfModule env_module>
  SetEnv htaccessWorking true
</IfModule>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/carddav/ [R]
RewriteRule ^.well-known/caldav /remote.php/caldav/ [R]
RewriteRule ^apps/([^/]*)/(.*\.(css|php))$ index.php?app=$1&getfile=$2 [QSA,L]
RewriteRule ^remote/(.*) remote.php [QSA,L]
</IfModule>
Options -Indexes

Is there anything I overlooked?

Thanks for any help in advance Smile
Back to top
mbierman



Joined: 08 Oct 2012
Posts: 5
Location: US, Palo Alto

PostPosted: Fri 19 Oct '12 17:14    Post subject: Reply with quote

Any update on this?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7354
Location: Germany, Next to Hamburg

PostPosted: Mon 22 Oct '12 11:22    Post subject: Reply with quote

What is in your error log and access log about this?
Back to top


Reply to topic   Topic: .htaccess problem View previous topic :: View next topic
Post new topic   Forum Index -> Apache