Tuesday, February 28, 2017

[LARAVEL]Change Laravel base URL from localhost to localhost/laravel5

I'm trying to change Laravel base URL to localhost/laravel5, I tried to change APP_URL variable in .env file, I did the same changes to this line in config/app.php file:
'url' => env('APP_URL', 'http://localhost/laravel5')  

And here my /etc/apache2/sites-available/laravel.conf file:
    <VirtualHost *:80>
    ServerName localhost/laravel5

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/laravel5/public

    <Directory /var/www/html/laravel5>
        AllowOverride All
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

I also tried to restart apache2 service, but nothing changes



via Hamza Moslah

Advertisement