indiWiz.com
SiteSearch:
Jump:

Site Map | WizTools.org | jCraze Blog
Web Developer's Den!
Home : WDD : ServerSide
This Article...
Print Version
Add Comment
View Comments
ServerSide
Apache on Linux
Apache User Directory Configuration
PostgreSQL Configuration
CGI: What and How?
PHP Jump Start Guide
Arrays in PHP
PHP and HTML Forms
Variable Passing in PHP
PHP 'include'
Drop-down Menu Navigation in PHP
Edit Your Site Online Using PHP
PHP MySQL Polling System
Dynamic, Search Engine Friendly Pages
Quot Ticker Using SSI
Regular Expressions Reference
PHP File Browser
PHP DB Deletion/Approval Script
Sections

Commniquè
Sign Guestbook!
Read Guestbook!
MailMe!

Apache on Linux

Apache is the most used web server in the net. And as so many other things that originated on the linux/unix environment, this one too is free.

By using a web server software you can exactly see how your site will display when you upload it to your server. And when you are using server-side scripting language, the existence of a web server becomes mandatory (for checking and debugging the program).

Most linux distributions come with apache bundled. Check your distribution CD. Otherwise you may download the same from http://www.apache.org/. Be sure to read the installation instruction before you install!

Once you install apache, it automatically runs as a system daemon. If not, issue this command:
#ntsysv
and select "http" from the list.

Apache Commands

For finding the status of apache(to check whether it is running or not):
#/etc/rc.d/init.d/httpd status

To start apache:
#/etc/rc.d/init.d/httpd start

To stop apache:
#/etc/rc.d/init.d/httpd stop

To restart apache:
#/etc/rc.d/init.d/httpd restart

Using Apache

Once you know that apache is running, you can check it by pointing your browser to http://127.0.0.1/ or http://localhost/. If you have installed apache properly, then you will see the apache welcome page. The physical location of this welcome page is:
/home/httpd/html/ (in RedHat Linux6.2)
/var/www/html (in RedHat Linux7.1)
Within the httpd/www directory you will find the cgi-bin directory, where you have to store your Perl, Python etc. scripts. The contents of this directory can be accessed by http://localhost/cgi-bin/scriptname.ext.

Configuring Apache

Configuring apache is NOT a easy task! For configuring even the simplest of things you may need to open one or two configuration files, make changes/add new entry, restart apache for checking whether the new configuration works. The good news is that all these script files are thoroughly commented for easy understanding. In fact, even without going through the apache manual (available in the installation, point your browser to http://localhost/manual/) you may succeed in making some configuration changes.The configuration files are available in the folder:
/etc/httpd/conf/
From version 1.3.4, the various configuration files have been unified into one file: httpd.conf.


User Comments

Add Comment

[Quick Stats: Number of main threads: 0, Number of sub-threads: 0]

Sign Guestbook | Who is Subhash?
The contents of this site are copyright© 2000-2008, indiWiz.com. All Rights Reserved.