Tech:Open Source/Setup/Apache2

From Cyclopath

Jump to: navigation, search
up to: Tech:Open Source > Setup

[edit] Configure Apache

[edit] Configure apache2

In apache_wait_stop(), change "sleep 1" to "sleep 10" (though only on development machines, not on production boxes).

sudo gvim /etc/init.d/apache2

FIXME What does sleep 10 do?

Make the logs group-readable

sudo gvim /etc/logrotate.d/apache2

In the block, find 'create 640 root adm' and change to

create 640 root grplens

Next, do these (FIXME Why?)

sudo a2enmod deflate
sudo a2enmod rewrite

Finally, restart Apache.

sudo /etc/init.d/apache2 restart

[edit] Configure sites-available

Rather than use httpd.conf, Cyclopath uses sites-available to configure Apache. If you get a copy of someone's existing file, just change the paths and usernames in the file to reflect your machine paths and your username.

gvim /etc/apache2/sites-available/cyclopath
 
sudo rsync -t -a -v landonb@foobar:/etc/apache2/sites-available/cyclopath /etc/apache2/sites-available/cyclopath


sudo chown landonb /etc/apache2/sites-available/cyclopath
chgrp grplens /etc/apache2/sites-available/cyclopath
 
sudo ln -s /etc/apache2/sites-available/cyclopath /etc/apache2/sites-enabled/cyclopath
 
sudo rm /etc/apache2/sites-enabled/000-default
 
sudo /etc/init.d/apache2 reload
 
sudo /etc/init.d/apache2 restart
Personal tools