Created
March 22, 2018 01:12
-
-
Save AhmedHelalAhmed/145b32c329fb57c1f6e2d4ca9e34b69f to your computer and use it in GitHub Desktop.
Commends to make virtual host in apache
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
| #to add virtual host | |
| sudo vim /etc/apache2/sites-available/000-default.conf | |
| sudo vim /etc/hosts | |
| #for restart | |
| /etc/init.d/apache2 restart | |
| sudo service apache2 restart | |
| #needed for MVC | |
| #enabled RewriteEngine mod | |
| sudo a2enmod rewrite | |
| #to see apache log | |
| sudo tail /var/log/apache2/error.log | |
Author
Author
sudo a2ensite Laravel-lab.local.conf
Author
Had the same problem on Ubuntu Server 16.04. Solved it by setting AllowOverride to All and enabling mod rewrite
sudo a2enmod rewrite
sudo service apache2 restart
Hope this helps
https://laracasts.com/discuss/channels/servers/urls-only-work-when-indexphp-is-used
Author
Bash script to make the virtual host for Ubuntu and apache2 with document root the current path
https://gist.github.com/AhmedHelalAhmed/e9ac4ff67ddd869fd7ef2310f909fc21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Laravel-Lab
Laravel-Lab.local
/var/www/html/Laravel-Lab/public
sudo systemctl restart apache2
avaliable to enable => a2ensite filename
enable to availibel => a2dissite filename