Skip to content

Instantly share code, notes, and snippets.

@tbekaert
Last active January 3, 2017 08:24
Show Gist options
  • Save tbekaert/a439bcbd7e415aff3f66 to your computer and use it in GitHub Desktop.
Save tbekaert/a439bcbd7e415aff3f66 to your computer and use it in GitHub Desktop.

Edit vhost

sudo nano /etc/apache2/extra/httpd-vhosts.conf

  <VirtualHost *:80>
    ServerName localwebsite.local
    DocumentRoot "/Users/username/workspace/localwebsite"
    ErrorLog "/private/var/log/apache2/localwebsite-error_log"
    CustomLog "/private/var/log/apache2/localwebsite-access_log" common
   <Directory "/Users/username/workspace/localwebsite">
     Require all granted
      Options Includes FollowSymLinks
      AllowOverride All
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>

Update hosts

sudo nano /etc/hosts

  127.0.0.1 localwebsite.local

Restart apache

sudo apachectl restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment