0

I Installed Laravel 4 on Ubuntu 12.04, I follow these steps from -

 http://www.dev-metal.com/install-laravel-4-ubuntu-12-04-lts/

www.dev-metal.com/install-laravel-4-ubuntu-12-04-lts/

Activate mod_rewrite

Install the mod_rewrite module (or extension or whatever it is) and restart the Apache:

sudo a2enmod rewrite
sudo service apache2 restart

Open the default vhost config file:

sudo nano /etc/apache2/sites-available/default
DocumentRoot /var/www
<Directory /var/www>

and change them to

DocumentRoot /var/www/public
<Directory /var/www/public>

than Install Laravel 4

cd /var/www
wget https://github.com/laravel/laravel/archive/master.zip
unzip master.zip && cd laravel-master/ && mv * ../ && cd ..
rm -r laravel-master && rm master.zip

Run the installation with Composer by

composer install

and restart the server:

sudo service apache2 restart

than successfully installed and message : enter image description here

but when I'm trying to run another web project for example

http://localhost/demo

than error comes like :

Not Found

The requested URL /demo was not found on this server.

Apache/2.2.22 (Ubuntu) Server at localhost Port 80
Kamlesh Kumar
  • 1,632
  • 2
  • 21
  • 31

3 Answers3

1

Add the following to your apache directory configuration.

AllowOverride All

Colin Schoen
  • 2,526
  • 1
  • 17
  • 26
0

go to the httpd.conf file of the server and remove hash (comment tag) from line showing below

LoadModule rewrite_module modules/mod_rewrite.so

it may be created from server side.

Brn.Rajoriya
  • 1,534
  • 2
  • 23
  • 35
0

That is because your DocumentRoot is now set to /var/www/public which, i think where your problem is. Try putting your demo project folder inside the public folder then, try again. If it is a route, add it to /app/routes.php