(This may belong on serverfault, since apache is causing the error; please move if necessary.)
I have a CodeIgniter site that I'm trying to display an image in. My image is stored in the ignite/application/images folder (where ignite is actually the root install of CodeIgniter), and here's my code:
<td><img src="<?php echo base_url(); ?>application/images/unrav.png" /></td>
The rendered source produces the following URL:
<td><img src="http://localhost/ignite/application/images/unrav.png" /></td>
This SHOULD work, but it's not displaying the image, and when I go to the URL directly, I get the following error:
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Sun 20 Feb 2011 04:31:02 PM CST
Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
I've checked the image permissions and set them to 777 (read, write, execute for owner, group, and public). This is on my local dev server, and if I go a File/Open in my browser and navigate through the file system to the image, it does display correctly, so I know the image isn't corrupted or anything. Can anyone give me an idea of what's happening? I've strictly done development up to this point, no server admin, so I'm not at all familiar with what apache's problem is.
EDITED to add apache error log:
[Sun Feb 20 16:26:07 2011] [error] [client 127.0.0.1] client denied by server configuration: /opt/lampp/htdocs/ignite/application/images/unrav.png
EDITED AGAIN to add .htaccess:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|css)
aRewriteRule ^(.*)$ /index.php/$1 [L]
EDITED YET AGAIN to add apache log after adding RewriteBase:
[Sun Feb 20 17:02:19 2011] [notice] suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Sun Feb 20 17:02:19 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Feb 20 17:02:19 2011] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Sun Feb 20 17:02:19 2011] [notice] Digest: generating secret for digest authentication ...
[Sun Feb 20 17:02:19 2011] [notice] Digest: done
[Sun Feb 20 17:02:20 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Feb 20 17:02:20 2011] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Sun Feb 20 17:02:20 2011] [notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations