Setting Apache Web Server

Untuk mensetting Apache Web Server, edit file httpd.conf yang ada di direktori /etc/httpd/conf dengan menggunakan teks editor misalnya gedit.  Tampilan gedit adalah seperti tampak dibawah ini.



Buka file httpd.conf mengklik tombol Open




Berikut ini adalah potongan isi file httpd.conf


# This is the main Apache server configuration file.  It contains the

# configuration directives that give the server its instructions.

# See <URL:; for detailed information.

# In particular, see

# <URL:;

# for a discussion of each configuration directive.


# Do NOT simply read the instructions in here without understanding

# what they do.  They’re here only as hints or reminders.  If you are unsure

# consult the online docs. You have been warned. 


# The configuration directives are grouped into three basic sections:

#  1. Directives that control the operation of the Apache server process as a

#     whole (the ‘global environment’).

#  2. Directives that define the parameters of the ‘main’ or ‘default’ server,

#     which responds to requests that aren’t handled by a virtual host.

#     These directives also provide default values for the settings

#     of all virtual hosts.

#  3. Settings for virtual hosts, which allow Web requests to be sent to

#     different IP addresses or hostnames and have them handled by the

#     same Apache server process.


# Configuration and logfile names: If the filenames you specify for many

# of the server’s control files begin with “/” (or “drive:/” for Win32), the

# server will use that explicit path.  If the filenames do *not* begin

# with “/”, the value of ServerRoot is prepended — so “logs/foo.log”

# with ServerRoot set to “/etc/httpd” will be interpreted by the

# server as “/etc/httpd/logs/foo.log”.


### Section 1: Global Environment


# The directives in this section affect the overall operation of Apache,

# such as the number of concurrent requests it can handle or where it

# can find its configuration files.


# Don’t give away too much information about all the subcomponents

# we are running.  Comment out this line if you don’t mind remote sites

# finding out what major optional modules you are running

ServerTokens OS


# ServerRoot: The top of the directory tree under which the server’s

# configuration, error, and log files are kept.


# NOTE!  If you intend to place this on an NFS (or otherwise network)

# mounted filesystem then please read the LockFile documentation

# (available at <URL:;);

# you will save yourself a lot of trouble.


# Do NOT add a slash at the end of the directory path.


ServerRoot “/etc/httpd”

Ada banyak hal yang bisa disetting, beberapa baris sudah disetting default dan ada yang harus kita setting sendiri untuk menyesuaikan dengan kondisi kita. Baris yang paling penting untuk diperhatikan dan kalau perlu diedit adalah:



ServerRoot “/etc/httpd”

PidFile run/


User apache

Group apache



DocumentRoot “/internet/www/”

DirectoryIndex index.php index.htm index.html


Setelah file httpd.conf selesai diedit, jalankan Apache web server dengan mengaktifkan service httpd pada menu service dengan cara sebagai berikut: (contoh menggunakan Fedora Core 5)


System à Administration à Server Setting à Service


Pada menu Service Configuration, beri tanda centang pada httpd dan kemudian klik tombol Start.  Tunggu beberapa saat sampai muncul menu “httpd start successful”.  Simpan setting dengan mengklik icon Save.



Apache web server sudah berjalan.  Untuk menguji web server yang baru kita buat,  pada browser ketik http://localhost  atau http://ip_address komputer yang menjalankan web server tersebut.  Pada Linux Fedora Core 5, tampilan halaman web server yang telah berhasil disetting adalah seperti dihalaman berikut ini.


Jika muncul tampilan seperti diatas, selamat! Anda telah berhasil membuat sebuah web server.  Langkah berikutnya adalah menempatkan file-file halaman web kita di direktori /internet/www seperti yang telah kita tentukan pada file konfigurasi httpd.conf sebelumnya.


Contoh di halaman berikut adalah tampilan website Politeknik Kesehatan Tanjungpinang, yang dibuat dengan Macromedia Dreamweaver 8, ditempatkan di web server http://localhost. Dengan browser Internet Explorer di Windows dan Firefox di Linux.


About ibnu-rusdi
Name: Ibnu Rusdi Birthday: 23-11-1970 Sex: Male Education: Master Degree Job: Teacher, Bussiness

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: