NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
jasonhollett
Jul 16, 2008Guide
Enabling .htaccess
Hi,
I've been trying to get .htaccess files working on my ReadyNAS, but Apache doesn't seem to be setup to do this by default. A .htaccess file on my server with just "RewriteEngine on" causes a 403 Forbidden error. From my googling, I've seen lots of references to adding "AllowOverride All" and "Options +FollowSymLinks" in the httpd.conf file, but I haven't had any luck so far.
Anyone have any ideas? Thanks!
I've been trying to get .htaccess files working on my ReadyNAS, but Apache doesn't seem to be setup to do this by default. A .htaccess file on my server with just "RewriteEngine on" causes a 403 Forbidden error. From my googling, I've seen lots of references to adding "AllowOverride All" and "Options +FollowSymLinks" in the httpd.conf file, but I haven't had any luck so far.
Anyone have any ideas? Thanks!
19 Replies
Replies have been turned off for this discussion
- dbott67GuideI've fiddled with .htaccess in response to another post, but have not otherwise used it.
viewtopic.php?f=17&t=17846&p=96678#p96678
One of the key issues for .htaccess usage is making sure that the ownership of the file is set correctly (as noted in step #6).
-Dave - Thanks Dave,
I gave that a try, but the ownership is already set to nogroup so I believe the problem is somewhere in the Apache config. Anything I put in the .htaccess file just gets ignored. - I finally got this working after, thank you apache error log.
The problem was that the web share only had "Options Indexes" in the apache config file. It needed to be set to "Options All" for .htaccess to work. Though the block of code that needed to be edited wasn't in httpd.conf, it was in Shares.conf which was being called though an include in httpd.conf. The apache config files are found in /etc/frontview/apache.
Just thought I would share that for anyone else who has this issue seeing the ReadyNAS doesn't support .htaccess out of the box. At least not ours anyway. - tcblackAspirantany potential pitfalls caused by changing this? I'm not an apache nut. :roll:
On the upside Drupal is working. 8) - None that I know of, my ReadyNAS has been working without any problems.
- tcblackAspirantStrange, but I changed it twice and it has actually reverted after a reboot!
Third time's a charm and it stuck. Any ideas why? - tcblackAspirantNow I'm buffaloed. The shares.conf file is NOT staying edited. Whenever I reboot it reverts back to Options Indexes.
I'm using firmware beta t120 - dbott67Guide
tcblack wrote: Now I'm buffaloed. The shares.conf file is NOT staying edited. Whenever I reboot it reverts back to Options Indexes.
I'm using firmware beta t120
I seem to recall this being an issue with a number of system files that were overwritten during reboots. You can use the following command to make the file immutable:chattr +i /path/to/file
To unset the file:chattr -i /path/to/file
If you search the forums for 'chattr', you'll find threads related to your issue, but some of them are still out in the ether thanks to the server crash.
-Dave - tcblackAspirantThanks Dave!
I'll do some reading on Chattr. That did the trick of course. While I'm far from a Linux guru, I've never heard of chattr. I'll do some reading. - cdeelAspirantJust for future reference...
I seem to have beaten this by writing my own .conf file (called AjaXplorer.conf in this case) and then added an additional Include directive in httpd.conf (below the Include for Shares.conf).
I noticed that Shares.conf seems to always get overwritten at each reboot, however httpd.conf does not get overwritten (probably the reason for separating them in the first place!)
My special .conf file contains the same lines as the relevant portion of Shares.conf, but with Options Indexes changed to Options -Indexes.
Trying to browse the directories now gives a 403 Forbidden message, which is what I wanted.
My solution seems to have survived a reboot.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!