Welcome Guest, Not a member yet? Register   Sign In
Directory access is forbidden.
#1

[eluser]johnmerlino[/eluser]
I created a site around a year ago in codeigniter, put it on godaddy's shared hosting, and now I need to make changes to it. I pull the system directory and its content to my local machine, and try to run it on localhost and I am greeted with "Directory access is forbidden", even though the site works fine on the live server. This is actually the content in the index.html file, which means the module rewrite rules are not redirecting. Note that I enabled mod_rewrite module in apache, and my virtual hosts should be right:

<VirtualHost *:80>
ServerAdmin webmaster@localhost

ServerName lawgroup
DocumentRoot /home/viggy/public_html/lawgroup.com/system
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/viggy/public_html/lawgroup.com/system>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>


As you can see, I specify AllowOverride All, so that .htaccess file can override directives in the virtual host.

Now, I do have an .htaccess file on the server and I created one directly below the system directory, and added this content:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>

But it's still triggering that html file "Directory access is forbidden".

This is what the structure looks like:

~/public_html/lawgroup.com/system$ ls -a -l
total 80
drwxrwxr-x 15 viggy viggy 4096 Nov 13 19:57 .
drwxrwxr-x 3 viggy viggy 4096 Nov 12 20:32 ..
drwxrwxr-x 13 viggy viggy 4096 Nov 12 20:32 application
drwxrwxr-x 2 viggy viggy 4096 Nov 12 20:37 cache
drwxrwxr-x 2 viggy viggy 4096 Nov 12 20:32 codeigniter
drwxrwxr-x 3 viggy viggy 4096 Nov 12 20:32 database
-rw-rw-r-- 1 viggy viggy 6147 Nov 12 20:32 .DS_Store
drwxrwxr-x 5 viggy viggy 4096 Nov 12 20:32 examples
drwxrwxr-x 2 viggy viggy 4096 Nov 12 20:32 fonts
drwxrwxr-x 2 viggy viggy 4096 Nov 12 20:32 helpers
-rw-rw-r-- 1 viggy viggy 206 Nov 13 19:45 .htaccess
-rw-rw-r-- 1 viggy viggy 114 Nov 12 20:32 index.html
drwxrwxr-x 3 viggy viggy 4096 Nov 12 20:32 language
drwxrwxr-x 2 viggy viggy 4096 Nov 12 20:32 libraries
-rw-rw-r-- 1 viggy viggy 1241 Nov 12 20:32 license.txt
drwxrwxr-x 2 viggy viggy 4096 Nov 12 20:32 logs
drwxrwxr-x 6 viggy viggy 4096 Nov 12 20:32 manual
drwxrwxr-x 2 viggy viggy 4096 Nov 12 20:32 plugins
drwxrwxr-x 4 viggy viggy 4096 Nov 12 20:32 scaffolding


thanks for a response.




Theme © iAndrew 2016 - Forum software by © MyBB