NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Vaclav
Nov 13, 2013Aspirant
OS 6.1.4 apache2 mod_rewrite .htaccess problem
Hi, I'm trying configure apache2 to enable mod_rewrite in my HTTP enabled share folder. I use that folder as my personal webserver for PHP development. I have root access via SSH to my ReadyNAS, I...
Vaclav
Nov 17, 2013Aspirant
why not creating you own conf file for your http site without touching /etc/apache2/sites_enabled/000-fv-http which could be rewritted after a fw upgrade ?
I created separed apache configuration file for my project
/etc/apache2/sites-enabled/010-nette
That file has following content
root@nas-35-05-E7:/data/www/nette/www# cat /etc/apache2/sites-enabled/010-nette
<Directory /data/www/nette/>
AllowOverride All
Options +Indexes
Order allow,deny
Allow from all
</Directory>
That file put my .htaccess into action, but it leads to 403 / forbidden. Now playing with permission.
Files in web shared folder must be owned by webserver user. Variables
$[APACHE_RUN_USER]are defined in /etc/apache2/envars so
$[APACHE_RUN_GROUP]
cat /etc/apache2/envarstells, that webserver user:group pair on OS6 is admin:admin. Can also be verified by checking running apache2 process
ps -aux | grep apache2
I decided to change webserver user from admin to www-data, so I changed envars from admin to www-data and restarted apache. Files and folders in web shared folder had mixed ownership and permissions, so to be sure, that ewerything is owned by the same user with propper permission, I ran
chown -R www-dataon folder /data/www/nette/, where I need mod_rewrite enable. Still getting 403 / Forbidden
chmod -R 0755
Related Content
NETGEAR Academy

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