php - Virtual Host doesn't work with URI in Apache 2... laravel 4.2 and laravel 5 -
i working laravel 5
i have created virtual host demo.com pointed public folder of laravel .it runs fine in browser , shows me index.php file. when try demo.com/home 404 error:
not found requested url /home not found on server. apache/2.4.7 (ubuntu) server @ demo.com port 80
the routes.php looks this:
route::get('/', 'welcomecontroller@index'); route::get('home', 'homecontroller@index');
it runs fine when use laravel development server, doing php artisen serve , type in browser localhost:8000/home takes me default auth login page.
the config file in /etc/apache2/sites-available/demo.com.conf looks this
<virtualhost *:80> servername demo.com serveralias demo.com documentroot /var/www/html/laravel/demo/public errorlog ${apache_log_dir}/demoerror.log customlog ${apache_log_dir}/demoaccess.log combined </virtualhost>
and /etc/hosts looks this:
127.0.0.1 localhost 127.0.0.1 demo.com
any appreciated, in advance
Comments
Post a Comment