vikrantnegi
12/15/2016 - 10:20 AM

Mac vhosts

Mac vhosts

sudo nano /etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
    ServerName example.dev
    ServerAlias www.example.dev
    
    DocumentRoot "/Users/vikrant/Documents/projects/project_folder"
    ErrorLog "/private/var/log/apache2/example.local-error_log"
    CustomLog "/private/var/log/apache2/example.local-access_log" common
    ServerAdmin web@localhost.com

        <Directory "/Users/vikrant/Documents/projects/project_folder">
                Order allow,deny
                AllowOverride All
                Allow from all
                Require all granted
        </Directory>

</VirtualHost>

sudo nano /etc/hosts
127.0.0.1 example.dev
sudo apachectl restart
sudo mysql.server start