We Recommend

Accelerated C# 2008 Accelerated C# 2008
This book is both a rapid tutorial and a permanent reference. You’ll quickly master C# syntax while learning how the CLR simplifies many programming tasks. You’ll also learn best practices that ensure your code will be efficient, reusable, and robust. Why spend months or years discovering the best ways to design and code C# when this book will show you how to do things the right way, right from the start?


Posted By

micmath on 08/18/07


Tagged

apache


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

basicmagic


Set up a local virtual host website


Published in: Other 


  1. // edit httpd.conf or some included apache configuration file...
  2.  
  3. <VirtualHost *:80>
  4. ServerName local.mysite.com
  5. DocumentRoot /usr/local/Sites/local.mysite.com/public_html
  6. ErrorLog /usr/local/Sites/local.mysite.com/logs/error_log
  7. CustomLog /usr/local/Sites/local.mysite.com/logs/access_log combined
  8. ScriptAlias /cgi-bin/ "/usr/local/Sites/local.mysite.com/public_html/cgi-bin/"
  9. </VirtualHost>
  10. <Directory /usr/local/Sites/local.mysite.com/public_html>
  11. AllowOverride all
  12. Options MultiViews Indexes FollowSymLinks Includes +ExecCGI
  13. Order allow,deny
  14. Allow from all
  15. </Directory>
  16.  
  17. // then...
  18.  
  19. $ sudo sh -c 'echo "127.0.0.1 local.mysite.com" >> /etc/hosts'
  20. $ lookupd -flushcache
  21. $ sudo apachectl configtest
  22. $ sudo apachectl restart
  23.  
  24. // to give apache access to a folder in your home dir...
  25.  
  26. $ sudo gpasswd -a apache yourgroup
  27.  
  28. // otherwise make sure that the directory containing your HTML files and each of its parent directories has chmod o+x set on it

Report this snippet 

You need to login to post a comment.