01 February 2012

VirtualHost on Linux

VirtualHost on Linux Create file :
<VirtualHost *:80>
  ServerAdmin admin@project
  ServerName  project.dev
  DocumentRoot /home/Workspace/project
  <Directory /home/Workspace/project/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    allow from all
  </Directory>
  ErrorLog "|/usr/sbin/rotatelogs /home/log/apache_logs/project/error.log.%Y-%m-%d-%H_%M_%S 86400"
  CustomLog "|/usr/sbin/rotatelogs /home/log/apache_logs/project/access.log.%Y-%m-%d-%H_%M_%S 86400" combined
</VirtualHost>
Make link
ln -s /etc/apache2/sites-available/project /etc/apache2/sites-enabled/.
Insert to file
127.0.0.1   project.dev
Create dir for log
mkdir /home/log/apache_logs/project
Restart Apache
/etc/init.d/apache2 restart

.htacceess: Invalid command 'RewriteEngine'

.htacceess: Invalid command 'RewriteEngine' You haven't loaded mod_rewrite. (as a superuser)
a2enmod rewrite
apache2ctl restart

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Blog by Chagridsada Boonthus | http://chagridsada.blogspot.com/