![]() |
Tuesday, December 05, 2023 |
By The Voodooman | what's new | faq | about |
Apache Installation Walkthrough
I. Before you start II. Downloads III. Installation IV. Configuration V. Credits N Stuff Sub-SectionsPreliminaries1. Configuring Apache 2. Removing Junk Files 3. Testing |
ConfigurationWe're almost at the end of the process. All that remains to be done is to configure Apache to run properly and then your web-site should be up and running.PreliminariesThe first thing to do is to make sure that the httpd daemon is not already running. You can check this by typing:
ps -xaf If you see any httpd processes running, then note down the number under the PID column for the first httpd process and type the following at the prompt:
kill PID
where PID is the number that you noted earlier. This will stop the running httpd processes. You can verify that the processes are not running any more by typing 'ps -xaf' again. Security TipIn the interests of security, you should add an account called www for running apache alone. Older versions of FreeBSD and all versions of RedHat Linux do not come with this account installed by default. If this account is not already present on your system, add it now. To add this account, type:
Now make sure that this account cannot log into the system. To do this, use the utility vipw if necessary and change www's default shell from /bin/sh or whatever to /sbin/nologin. TOP 1. Configuring ApacheThe next step is to configure the Apache Web Server. To do this, follow the steps in sequence.TOP 2. Removing Junk FilesThis is an optional step, but the author usually does it anyway, just to reduce the number of files in the default document directory (/var/www/htdocs/). There are a large number of files installed by default in this directory, which are all in different languages. The author usually removes all of them except for index.html.The author also removes all the files in /usr/local/etc/httpd/ except for httpd.conf, magic and mime.types. You can do this also, if you wish. The author also normally empties out the default icons directory (/var/www/icons) as he normally has no use for all these icons. TOP 3. TestingThe following instructions assume that you've actually created the home directories for the domains and put files in there. For example, in httpd.conf, I've specified that the base directory for yourdomain.com is /var/www/htdocs and that the default document (specified by the DirectoryIndex directive above) is index.html. For the www.mayukhbose.com domain, I've overridden some default values (the 403, 404 and default documents) and also specified a different base directory. Make sure that you have files in the proper locations as per your own settings. All you have to do is:
TOP |
<<Previous: Installation | ^Up to Mayukh's World^ | Next: Credits N Stuff >> |
Apache Installation Walkthrough
Last updated 08/01/2003