Created
May 9, 2013 01:25
-
-
Save lelotnk/5544916 to your computer and use it in GitHub Desktop.
Habilitar Laravel4 no localhost (ubuntu)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First create an additional vhosts file, for example /etc/apache2/sites-available/laravel | |
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName laravel.dev | |
ServerAlias *.laravel.dev | |
DocumentRoot /var/www/laravel/public | |
</VirtualHost> | |
Then update your /etc/hosts file and add | |
127.0.0.1 laravel.dev | |
This will make a sim link in /etc/apache2/sites-enabled to your vhost config file. | |
sudo a2ensite laravel | |
Finally restart your server: | |
sudo service apache2 restart | |
You should be able to connect with the url http://laravel.dev, and your rewrites should be working. | |
---- | |
If you need, run the following command in Terminal to enable mod_rewrite. | |
sudo a2enmod rewrite | |
Now restart Apache. | |
sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment