Recent Posts

Membuat halaman 404 static di apache

Jumat, April 24, 2015
Untuk Membuat halaman 404 static di apache sangat mudah, silahkan kamu ikuti langkah berikut ini :

Tambahkan baris dibawah ini pada akhir file /etc/apache2/apache2.conf
#nano /etc/apache2/apache2.conf
ErrorDocument 404 /404.html

Buat file 404.html, dan isikan sesuai isian yang saya berikan
#nano /var/www/404.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Website is under constructions</title>
<style>
   
    body{
margin:0;
padding:0;
background: #fff url(background.jpg) top left no-repeat;
font-family: Helvetica Neue, Helvetica, Arial;
color: #444444;
}

#content_wrapper{
    width: 630px;
    margin: 0 auto;
}

.content{
width: 630px;
float: left;
margin-top: 270px;
}

.clear{
clear: both;
}

ul.social{
width: 58px;
margin: 0 auto 45px auto;
}

ul.social li{
float: left;
}

ul.social li a{
width: 24px;
height: 24px;
float: left;
}


p.made_in{
color: #444444;
font-size: 13px;
text-transform: uppercase;
letter-spacing: 3px;
text-align: center;
margin-bottom: 15px;
}

h1{
text-align: center;
font-size: 60px;
color: #444;
}




h2{
font-size: 21px;
text-align: center;
font-weight: bold;
text-transform: uppercase;
margin-bottom: 6px;
}

.good_news p{
font-size: 18px;
text-align: center;
}
    </style>
</head>
<body>
<div id="content_wrapper">
    <div class="content">
        <div class="clear"></div>
        <title>File Not Found</title>
<h1>Oops, we do not find what you are looking for</h1>
<p>It seems that we have put that page in a place we can't remember, as we can not find it.</p>
<p>If you are sure that the page you are looking for should be here please contact the webmaster.</p>
    <p class="made_in">Contact US : ruhan@namadomain.com</p>   
    </div>
</div>
</body>
</html>
 Agar perubahan dapat berhasil kita reload apache
#/etc/init.d/apache2 reload

Selamat mencoba, sampai tahap tadi sudah selesai tutorial "Membuat halaman 404 static di apache"

Tidak ada komentar:

Posting Komentar