Category Archives: apache

How to Build a WebServer on CentOS 6.4

You must Install Centos on your Server and I am here Using Centos 6.4.

Some we Need For Build a WebServer on CentOS 6.4 :


Lets Install all it.


yum install httpd

and now configure apache in the startup

chkconfig --levels 235 httpd on

and start it

service httpd start

Test it in your Browser


yum install php

and restart your apache

service httpd restart

and test the php by create the file “info.php”

cd /var/www/html/

nano info.php

put this code :

<? phpinfo (); ?>

and open your browser

and you get all information about your system.


yum install mysql mysql-server

and configure in startup

chkconfig --levels 235 mysqld on

and now start it

service mysqld start

next Configure the root password for mysql :


pres ENTER – ENTER – ENTER and

if you see the word ” Set root password ? Y/N ” you must enter your password there and renter it. And just press ENTER to finish it.

Now is Getting MYSQL connect and support for PHP5.

yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc

and restart your Apache

service httpd restart

now check it from yor browser

and you get mysql there and other module.


Default Centos Repository is does not provide for phpmyadmin package.And we must install from other repositories.

for 32bit.

yum -y install

for 64bit.

yum -y install

now time to install :

yum -y install phpmyadmin

configure phpmyadmin to be easy to access.

nano /etc/httpd/conf.d/phpmyadmin.conf

and comment the code like this :

# Web application to manage MySQL

#<Directory "/usr/share/phpmyadmin">
# Order Deny,Allow
# Deny from all
# Allow from

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

next is changet the authentication from “cookie” to “http” :

nano /usr/share/phpmyadmin/

ctrl + w and type “cookie” ENTER. And Replace with “http

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';

now restart apache

service httpd restart

and test for phpmyadmin

and congratulations you have successfully built webserver on CentOS 6.4 – Thankz @howtoforge

The post How to Build a WebServer on CentOS 6.4 appeared first on ndesocode.

Mengatasi Httpd/ Apache Hang Pada Server anda

Anda yang menggunakan VPS (unmanaged) untuk hosting web anda sendiri tentu harus mengatasi sendiri jika ada masalah. Sebagai contoh adalah ketika web Anda jadi lambat diakses atau RTO.

Hal ini bisa disebabkan karena apache Anda ngehang. Anda bisa cek hal ini dengan login ke whm, lalu di “apache status” akan tertera tulisan warna merah yang artinya apache Anda tidak jalan.

Ikuti langkah berikut :

1. Login ke SSH via putty

2. Ketik :

grep -i maxclient /usr/local/apache/logs/error_log


tail -f /var/log/httpd/error_log

Jika muncul seperti ini :

[Fri Aug 02 06:59:37 2013] [error] server reached MaxClients setting, consider raising the MaxClients setting

itu artinya server anda sudah mencapai setting MaxClients, sehingga Anda harus menaikkan MaxClients dan ServerLimit di global setting apache

3. Di WHM, klik Apache Configuration > Global Configuration. Pada MaxClients dan ServerLimit ubah menjadi : 512

4. Klik tombol “Save“, lalu klik tombol “Rebuild Configuration and Restart Apache


Tips : Agar Anda bisa langsung mendapat notifikasi via email jika http request error, sebaiknya Anda daftarkan domain Anda di (gratis).

How to enable mod_rewrite in Apache

Salam all ..

tonight just share the article about mod_rewrite in Apache.
this is very usefull for us.

This module is make the URL look beutifull.
lets do it*

So Now Install your Apache :

sudo apt-get install apache2

then enable mod_rewrite

a2enmod rewrite

Oke lets Setting up mod_rewrite :

Search the file ” ” , type in terminal :


and you get the location ” /usr/lib/apache2/modules

So now go to apache directory :

cd /etc/apache2/sites-enabled/
nano rewrite.load

paste this code :

LoadModule rewrite_module /usr/lib/apache2/modules/

finish in this directory and go to other.

cd /etc/apache2/sites-available/
nano 000-default

go to this line :

Options Indexes FollowSymLinks MultiViews

and change this :

AllowOverride None


AllowOverride all
Save and Exit .
Now Restart your apache.
/etc/init.d/apache2 restart

The post How to enable mod_rewrite in Apache appeared first on ndesocode.