Last active
January 6, 2020 23:52
-
-
Save tomazsaraiva/011655fde9cef16d11638e9c2b2fc30b to your computer and use it in GitHub Desktop.
[Apache Virtual Hosts] #mamp #unix #server #apache
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
// local | |
// edit the hosts | |
sudo nano /etc/hosts | |
// edit the /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf | |
<VirtualHost *> | |
DocumentRoot "/Users/tomazsaraiva/Documents/example/" | |
ServerName example.localhost | |
</VirtualHost> | |
// server | |
// create /etc/apache2/sites-available/example.conf | |
<VirtualHost *:80> | |
ServerName example.com | |
ServerAlias www.example.com | |
ServerAdmin mail@example.com | |
DocumentRoot /var/www/example.com/public_html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment