Last active
January 6, 2016 13:43
-
-
Save phsacramento/9a862ddcdeab941a1708 to your computer and use it in GitHub Desktop.
Install PHP Site
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
# create website directory | |
cd /var/www/html/ | |
sudo mkdir nome-do-projeto | |
# create virtual host | |
cd /etc/apache2/sites-available | |
sudo nano projeto.conf | |
----- | |
<VirtualHost *:80> | |
# However, you must set it for any further virtual host explicitly. | |
ServerName projeto.dev | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/html/nome-do-projeto | |
ErrorLog /var/www/html/nomet-do-projeto/error.log | |
</VirtualHost> | |
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet | |
-------- | |
# create host for custom domain | |
sudo nano /etc/hosts | |
add 127.0.0.1 projeto.dev | |
# enable site projeto.dev | |
sudo a2ensite projeto.conf | |
sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment