/ Published in: Other
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
// edit httpd.conf or some included apache configuration file...
<VirtualHost *:80>
ServerName local.mysite.com
DocumentRoot /usr/local/Sites/local.mysite.com/public_html
ErrorLog /usr/local/Sites/local.mysite.com/logs/error_log
CustomLog /usr/local/Sites/local.mysite.com/logs/access_log combined
ScriptAlias /cgi-bin/ "/usr/local/Sites/local.mysite.com/public_html/cgi-bin/"
</VirtualHost>
<Directory /usr/local/Sites/local.mysite.com/public_html>
AllowOverride all
Options MultiViews Indexes FollowSymLinks Includes +ExecCGI
Order allow,deny
Allow from all
</Directory>
// then...
$ sudo sh -c 'echo "127.0.0.1 local.mysite.com" >> /etc/hosts'
$ lookupd -flushcache
$ sudo apachectl configtest
$ sudo apachectl restart
// to give apache access to a folder in your home dir...
$ sudo gpasswd -a apache yourgroup
// otherwise make sure that the directory containing your HTML files and each of its parent directories has chmod o+x set on it
Comments
 Subscribe to comments
                    Subscribe to comments
                
                