Running CodeIgniter on localhost from Ubuntu dist.

I'm trying to set up an development environment for CodeIgniter on an Ubuntu gutsy desktop installation. I've installed apache2, php5 and mysql-server and enabled apache2 mods rewrite and userdir.

Then I downloaded a working version of my CodeIgniter folder from my internet server to the /home/user/public_html/ folder, included the .htaccess file and finally reconfigured the settings in CodeIgniter's database.php and config.php. base_url and so on.

Both apache2 and mysql works fine from localhost an if I address my site like this; http://localhost/~tirithen/index.php/nyheter/sv; it displays the site as it should but if I write the adress like; http://localhost/~tirithen/nyheter/sv; I get this error message:
Quote:Not Found

The requested URL /index.php/nyheter/sv was not found on this server.
Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6 Server at localhost Port 80

At first I thought that something was wrong with mod_rewrite but on the 404 page it looks like index.php was added and the thing missing in the url is the base_url.
My base_url is set to
$config['base_url']    = "http://localhost/~tirithen/";
since this points to /home/tirithen/public_html/ via apache2 userdir mod.

Someone with experience from a setup similar to this one, after a few days I'm out of ideas. If I get this to work I'll write an howto for this forum from installing ubuntu -> displaying CodeIgniter's welcome message becouse I'm missing one.

Ah, and yes this is my .htaccess file from my sites root dir "public_html":
Quote:<IfModule mod_rewrite.c>
# AllowOverride All
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]


<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php

Comment the RewriteBase / in the .htaccess. Or change to the right dir of application, in this case ~tiririthen


Of course thanks a lot, to set RewriteBase to /~tirithen/ solved everything exept for an ~ that gets added as a last character to the url for some reason, I don't know why but it does not matter much since everything works anyway.
It's strange though...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.