Adding a website in OSX for debugging or testing
Sunday, December 4th, 2011
1. First edit your host file so you have a quick URL to use in your browser
1 | sudo nano /private/etc/hosts |
2. Edit the Apache config file to add a virtual server
1 | sudo nano /etc/apache2/httpd.conf |
and add
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Depicus Web Site <VirtualHost *:80> ServerAdmin anybody@example.com DocumentRoot "/Library/WebServer/Depicus/" DirectoryIndex index.php <Directory "/Library/WebServer/Depicus/"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> ServerName Depicus ErrorLog "/private/var/log/apache2/Depicus-error_log" CustomLog "/private/var/log/apache2/Depicus-access_log" common </VirtualHost> |
3. Restart Apache and you are good to go.







