[go: up one dir, main page]

0% found this document useful (0 votes)
54 views4 pages

Web Server Dengan Satu Domain

This document configures a web server with one domain (smk2tegal.net) on a Linux server. It sets the network interface and IP address, installs and configures BIND for DNS, edits configuration files for the domain and reverse DNS, enables the Apache virtual host, and creates an index.html file. When completed, the server can be accessed by its domain name and IP address, and provides DNS resolution for the domain and IP.

Uploaded by

Apa Kabar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views4 pages

Web Server Dengan Satu Domain

This document configures a web server with one domain (smk2tegal.net) on a Linux server. It sets the network interface and IP address, installs and configures BIND for DNS, edits configuration files for the domain and reverse DNS, enables the Apache virtual host, and creates an index.html file. When completed, the server can be accessed by its domain name and IP address, and provides DNS resolution for the domain and IP.

Uploaded by

Apa Kabar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

WEB SERVER DENGAN SATU DOMAIN

root@server:~# nano /etc/network/interfaces

# The primary network interface


allow-hotplug eth0
iface eth0 inet static
address 192.168.100.1
netmask 255.255.255.0
network 192.168.100.0
broadcast 192.168.100.255
gateway 192.168.100.1
# dns-* options are implemented by the resolvconf package,
if installed
dns-nameservers 192.168.100.1
dns-search smk2tegal.net
root@server:~# apt-get install bind9
root@server:~# cd /etc/bind/
root@server:/etc/bind#
root@server:/etc/bind# nano named.conf.local
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "smk2tegal.net" {
type master;
file "/etc/bind/db.smk2tegal";
};

zone "100.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192";
};
root@server:/etc/bind# cp db.local db.smk2tegal
root@server:/etc/bind# cp db.127 db.192
root@server:/etc/bind# nano db.smk2tegal
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA smk2tegal.net. root.smk2tegal.net. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS smk2tegal.net.
@ IN A 192.168.100.1
ns IN A 192.168.100.1
www IN A 192.168.100.1
@ IN AAAA ::1
root@server:/etc/bind# nano db.192

;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA smk2tegal.net. root.smk2tegal.net. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS smk2tegal.net.
1 IN PTR smk2tegal.net.

root@server:/etc/bind# cd
root@server:~#
root@server:~# nano /etc/resolv.conf
nameserver 192.168.100.1
search smk2tegal.net

root@server:~# service bind9 restart


root@server:~# nslookup 192.168.100.1
Server: 192.168.100.1
Address: 192.168.100.1#53

1.100.168.192.in-addr.arpa name = smk2tegal.net.

root@server:~# nslookup smk2tegal.net


Server: 192.168.100.1
Address: 192.168.100.1#53

Name: smk2tegal.net
Address: 192.168.100.1

root@server:~# apt-get install apache2


root@server:~# cd /etc/apache2/sites-available/
root@server:/etc/apache2/sites-available#
root@server:/etc/apache2/sites-available# cp default www
root@server:/etc/apache2/sites-available# nano www
<VirtualHost *:80>
ServerAdmin webmaster@localhost

ServerName smk2tegal.net
DocumentRoot /var/www/smk
# <Directory />
# Options FollowSymLinks
# AllowOverride None
# </Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
root@server:/etc/apache2/sites-available# a2ensite www
root@server:/etc/apache2/sites-available# a2dissite default
root@server:/etc/apache2/sites-available# cd
root@server:~#
root@server:~# mkdir /var/www/smk
root@server:~# cd /var/www/smk
root@server:/var/www/smk#
root@server:/var/www/smk# nano index.html

<H1> NYACAK <H1>

root@server:/var/www/smk# cd
root@server:~#
root@server:~# service apache2 reload

You might also like