2007/01/12

Apache Quick Setup on RedHat

We recently had to install Apache on a RedHat server which is very quick via RPM, however setting it up so it acts in a fashion familiar to those who use shared hosting comes with a few gotchas. Here are the steps once the RPM installation is complete:

Create the following directories in the user folder:
mkdir /home/myuser/logs
mkdir /home/myuser/public_html


Create the necessary Apache log files:
touch /home/myuser/logs/access_log
touch /home/myuser/logs/error_log


Set permissions:
chmod -R 755 /home/myuser/
chmod 644 /home/myuser/logs/access_log
chmod 644 /home/myuser/logs/error_log


Add the following to the Apache configuration file and adjust where necessary:
/etc/httpd/conf/httpd.conf

ServerAdmin support@example.com
DocumentRoot /home/myuser/public_html
ServerName example.com
ErrorLog /home/myuser/logs/error_log
CustomLog /home/myuser/logs/access_log common


Set Apache to run at boot:
sudo chkconfig httpd on

Once all of that is done Apache should automatically come up at boot.

Labels: , ,

1 Comments:

Anonymous Anonymous said...

haha, scott has to use linux.
-steve

4/19/2007 12:10 AM  

Post a Comment

Links to this post:

Create a Link

<< Home