December 24, 2014
Disable Browser Cache
November 14, 2013
Permission 600 di Litespeed
Pastikan suExec diaktifkan di Litespeed. Kalau file yang digenerate masi 600 dan folder 700 maka harus build ulang apache melalui easyapache dan pastikan
- Disable opsi Mime Magic
- Centang opsi Save my profile with appropriate PHP 5 options set so that it is compatible with cpphp
March 21, 2013
Mod_evasive untuk Mengatasi DDOS
Install Mod_Evasive untuk mengatasi DDOS
http://syslint.com/syslint/how-to-install-mod_evasive-in-cpanel-server/
July 1, 2012
Error ip_conntrack: table full, dropping packet
Error ip_conntrack: table full, dropping packet terjadi karena banyaknya kunjungan ke server dan menyebabkan database iptable menjadi penuh
solusi:
1. naikkan kapasitas iptable
echo 131072 > /proc/sys/net/ipv4/ip_conntrack_max
2. flush kosongkan iptable
iptables -P
iptables -F
June 15, 2012
Install Memcache
cd /usr/local/src/
wget https://github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar.gz
tar xfz libevent*
cd libevent*
./configure
make
sudo make install
sudo ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib
cd /usr/local/src/
wget http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz
tar xfz memcached*
cd memcached*
./configure
make
sudo make install
test memcached
memcached -d -u nobody -m 1024 127.0.0.1 -p 11211
Kalau error
ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5
Install libmemcached
cd /usr/local/src/
wget http://launchpad.net/libmemcached/1.0/1.0.4/+download/libmemcached-1.0.4.tar.gz
tar -zxvf libmemcached-1.0.4.tar.gz
cd libmemcached-1.0.4
./configure
make && make install
Install memcached
pecl install memcached
pecl install memcached
http://forums.cpanel.net/f5/memcached-instalation-memcached-so-missing-257942.html
March 26, 2012
Disable PHP Execition
open .htaccess and add
Order Deny,Allow
Deny from all
March 16, 2012
Nginx
Install NGINX
cd /usr/local/src
wget http://nginxcp.com/latest/nginxadmin.tar
tar xf nginxadmin.tar
cd publicnginx
./nginxinstaller install
Uninstall NGINX
cd /usr/local/src
wget http://nginxcp.com/latest/nginxadmin.tar
tar xf nginxadmin.tar
cd publicnginx
./nginxinstaller uninstall
Nginx Installation error:
File "/scripts/createvhosts.py", line 2, in ?
First uninstall nginx then run this command
wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz
tar fxz Python-2.5.2.tgz
cd Python-2.5.2
./configure
make
make install
Nginx running warning
nginx: [warn] conflicting server name "YOURIPADDRESS" on 66.228.117.248:80, ignored
nginx: [warn] conflicting server name "YOURIPADDRESS" on 66.228.117.248:80, ignored
nginx: [warn] conflicting server name "YOURIPADDRESS" on 66.228.117.248:80, ignored
nginx: [emerg] bind() to YOURIPADDRESS:80 failed (98: Address already in use)
nginx: [emerg] bind() to YOURIPADDRESS:80 failed (98: Address already in use)
nginx: [emerg] bind() to YOURIPADDRESS:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
already running.
run this commands
cd /etc/nginx/vhosts
perl -pi -w -e 's/server_name(.*) YOURIPADDRESS/server_name$1/g;' *
Replace YOURIPADDRESS with the ip address you see in the errors.
Now go to WHM > Tweak settings and change Apache non-SSL IP/port to 0.0.0.0:8081
February 2, 2012
httpd.conf permanent change on cpanel
jalankan command ini supaya httpd.conf yang baru diganti menjadi default apache (konfigurasi tidak hilang)
/usr/local/cpanel/bin/apache_conf_distiller –update
January 25, 2010
Apache Configuration Files
To find the location where apache is installed and to print configuration file location, run the following command:
# httpd -V
Here is the output from my Fedora Core/RedHat (RHEL) Linux server:
Server version: Apache/2.0.54
Server built: Jan 17 2006 06:36:00
Server’s Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with….
-D APACHE_MPM_DIR=”server/mpm/prefork”
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT=”/etc/httpd”
-D SUEXEC_BIN=”/usr/sbin/suexec”
-D DEFAULT_PIDLOG=”logs/httpd.pid”
-D DEFAULT_SCOREBOARD=”logs/apache_runtime_status”
-D DEFAULT_LOCKFILE=”logs/accept.lock”
-D DEFAULT_ERRORLOG=”logs/error_log”
-D AP_TYPES_CONFIG_FILE=”conf/mime.types”
-D SERVER_CONFIG_FILE=”conf/httpd.conf”
HTTPD_ROOT points to default location /etc/httpd and line SERVER_CONFIG_FILE points to configuration file conf/httpd.conf. So the path is /etc/httpd/conf/httpd.conf
Source: http://www.cyberciti.biz/tips/where-does-apache-server-store-its-configuration-files.html