Ubuntu server add subdomain for new Laravel project in 3 steps

subdomain, virtuális domain

1: sudo nano /etc/hosts

34.54.235.64 subdomain.mydomain.hu ( your IP, your sub domain )

2: Add /etc/apache2/apache2.conf this line

<VirtualHost *:80>
ServerName subdomain.mydomain.hu
DocumentRoot /var/www/your laravel project folder/public
<Directory /var/www/your laravel project folder/public>
Options +FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>

 

3: sudo service apache2 restart

How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS : https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

setting up subdomain on ubuntu server : http://askubuntu.com/questions/463618/setting-up-subdomain-on-ubuntu-server

*****
How to Use subdomain in Routes in laravel : https://www.dunebook.com/use-subdomain-in-routes-in-laravel-5-1/

https://www.linkedin.com/groups/4419933/4419933-6166863077137571841