Saturday, May 21, 2016

Solved - Server unable to read htaccess file, denying access to be safe

I create a custom virtual host on my apache for my current web project which is I called it as "manja.dev" and directed/located at my dropbox folder /home/krip-hensem/Dropbox/Coding/manja-dev, let have a look at our site config file :
$ cat /etc/apache2/sites-available/manja.dev.conf 

        <VirtualHost *:80>
            ServerAdmin [email protected]
            ServerName eSPTRBA.dev
            ServerAlias eSPTRBA.dev
            DocumentRoot /home/krip-hensem/Dropbox/Coding/manja-dev
            <Directory />
                AllowOverride All
            </Directory>
            <Directory /home/krip-hensem/Dropbox/Coding/manja-dev>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride all
                Require all granted
            </Directory>
            ErrorLog /var/log/apache2/manja.dev-error.log
            LogLevel error
            CustomLog /var/log/apache2/manja.dev-access.log combined
        </VirtualHost>

But then, I got an error message that telling :
"Forbidden
You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."

The heck! I tried to chmod .htaccess file with 644 permission. But nothing happen. It getting my nerve, so I check the error log :
$ cat /var/log/apache2/manja.dev-error.log
[Sat May 21 03:03:06.126741 2016] [core:crit] [pid 13917] 
(13)Permission denied: [client 127.0.0.1:45206] 
AH00529: /home/krip-hensem/Dropbox/.htaccess pcfg_openfile: 
unable to check htaccess file, ensure it is readable and that '/home/krip-hensem/Dropbox/' is executable

Auww.. This is kacang! Just need to let the *bold* folder executable, just ran an chmod command :
$ sudo chmod 755 /home/krip-hensem/Dropbox/
Tango! The problem just solved! Alhamdulillah..

No comments:

Post a Comment