Apache2 Configuration For Virtualhost

I’m trying to move my site to Ubuntu and it is just not working.

So far, I’ve done the following.

drwxr-xr-x 19 www-data root 4096 Jan 27 12:34 framework/

drwxr-xr-x 15 www-data root 4096 Jan 27 12:50 protected/

drwxr-xr-x  7 www-data root 4096 Mar  4 14:29 public_html/

and public_html has my index file and .htaccess.

Within /etc/apache2/site-available/sales I have the following:

<VirtualHost *:80>

        ServerName sales.consultimi.com

        DocumentRoot /var/www/sales/public_html

        <Directory /var/www/sales/public_html>

                Options Indexes FollowSymLinks MultiViews

                AllowOverride All

                Order allow,deny

                allow from all



and within /var/www/sales/public_html/.htaccess I have

Options +FollowSymLinks

IndexIgnore */*

<IfModule mod_rewrite.c>

  RewriteEngine on

  #RewriteBase /

  RewriteCond %{REQUEST_FILENAME} !-f

  RewriteCond %{REQUEST_FILENAME} !-d

  RewriteRule ^.*$ index.php


I’ve run a2enmod rewrite and restarted apache to make sure that is OK. This is the same config I have locally on XAMMP ( windows 8 ) and it works no problem. URL manager is configured this way (just in case it helps)










Any ideas/ suggestions are welcome.

I had a user permission issue recently when working with Yii on apache in ubuntu. I had to delete /var/lock/apache2 and the restart apache and it started working. What is the error you are getting?

you also have to enable the site/virtualhost you have added

// just double check it

$  a2ensite sales

Thanks for the replies all… sadly, while debugging I renamed .htaccess to see if that was causing problems. I made some changes, renamed it back to original but as .htacess. Go figure, that didn’t work. Once I named it properly, it all came back online, but I managed to miss out on whatever particular issue was causing the problem in the first place.