Langkah-langkah konfigurasi secara umum :
- Masuk ke web server sebagai root
- Edit file /usr/local/etc/apache/httpd.conf (kebetulan di sini pakai FreeBSD 7.0). Ralat: saat ini (Ags 2011) server menggunakan FreeBSD 8.1 dimana file konfigurasinya berubah menjadi /usr/local/etc/apache22/httpd.conf.
- Restart apache
$ su -
Password:
[root@serpongx] ~ # uname -a
FreeBSD serpongx.batan.go.id 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
Ralat:
$ uname -a
FreeBSD serpong4.batan.go.id 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
FreeBSD serpong4.batan.go.id 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
Edit file konfigurasi apache
[root@serpongx] ~ # mcedit /usr/local/etc/apache/httpd.conf
Ralat:
[root@serpong4 2011Aug13 7:43] ~ # mcedit /usr/local/etc/apache22/httpd.conf
Sebagian isi file httpd.conf
Alias /gunber "/home/msmunir/public_html/gunber"
<Directory "/home/msmunir/public_html/gunber">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
IndexOptions namewidth=*
</Directory>
Dalam contoh diatas, dianggap bahwa sub folder gunber diletakkan di bawah folder personal website diri sendiri. Sub folder gunber dapat diberi attribute 755, dengan owner diri sendiri.
Restart Apache
[root@serpongx] ~ # /usr/local/etc/rc.d/apache restart
Stopping apache.
Waiting for PIDS: 87977.
Starting apache.
Ralat:
[root@serpong4 2011Aug13 7:43] ~ # /usr/local/etc/rc.d/apache22 restartPerforming sanity check on apache22 configuration:
Syntax OK
Stopping apache22.
Waiting for PIDS: 26957.
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
Cek attribute sub folder
[root@serpongx] ~ # ls -l /home/msmunir/public_html/
total 250
drwxr-xr-x 2 msmunir msmunir 9728 Jan 29 06:44 download
FreeBSD : /usr/local/etc/apache/httpd.conf
Fedora : /etc/httpd/conf/httpd.conf
Addendum
Karena pergantian komputer server dan sekaligus mengganti sistem operasi dari FreeBSD 7.0 menjadi FreeBSD 8.1, maka ada sedikit perubahan dalam mengaktifkan halaman download. Misal alamat file httpd.conf dan cara merestart apache. Lokasi file httpd.conf dari /usr/local/etc/apache/httpd.conf menjadi /usr/local/etc/apache22/httpd.conf. Restart apache dari /usr/local/etc/rc.d/apache restart menjadi /usr/local/etc/rc.d/apache22 restart.[root@serpong4 2011Apr23 8:40] # /usr/local/etc/rc.d/apache22 restart
Performing sanity check on apache22 configuration:
Syntax OK
apache22 not running? (check /var/run/httpd.pid).
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
[root@serpong4 2011Apr23 8:47] # uname -a
FreeBSD serpong4.batan.go.id 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
[root@serpong4 2011Apr23 8:47] # uptime
8:51AM up 43 days, 21:21, 2 users, load averages: 0.05, 0.18, 0.12
No comments:
Post a Comment