Created
October 25, 2014 15:12
-
-
Save CiprianSpiridon/2e8e1fd52c067031040d to your computer and use it in GitHub Desktop.
Creating an Apache VirtualHost in Ubuntu for your laravel Project
This file contains 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
#go to the conf folder | |
cd /etc/apache2/sites-available | |
#create the new .conf file | |
sudo vi myapp.com.conf | |
#Add the following content to your .conf file | |
<VirtualHost *:80> | |
ServerAdmin webmaster@myapp.com | |
ServerName myapp.com | |
DocumentRoot /var/www/myapp.com/public/ | |
<Directory /var/www/myapp.com/public/> | |
Options -Indexes +FollowSymLinks +MultiViews | |
AllowOverride All | |
Require all granted | |
<FilesMatch \.php$> | |
# Change this "proxy:unix:/path/to/fpm.socket" | |
# if using a Unix socket | |
#SetHandler "proxy:fcgi://127.0.0.1:9000" | |
</FilesMatch> | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/myapp.com-error.log | |
# Possible values include: debug, info, notice, warn, error, crit, | |
# alert, emerg. | |
LogLevel warn | |
CustomLog ${APACHE_LOG_DIR}/myapp.com-access.log combined | |
</VirtualHost> | |
#Save the file, then continue below. | |
cd /etc/apache2/sites-enabled | |
sudo ln -s ../sites-available/myapp.com.conf | |
#Restart apache | |
sudo service apache2 restart | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#
qweqweqwe