dapurhosting.com Blog for Tech

October 20, 2013

Domain already setup

Filed under: cPanel/WHM — Tags: — dh @ 3:13 pm

Jika addon domain error dan muncul pesan sbb:

domain.tld is already configured. Sorry, the domain 'domain.tld' is already setup (remove it from httpd.conf with '/scripts/killvhost domain.tld', and be sure to excise it from /var/cpanel/userdata/)

Solusi:

Jalankan perintah ini:

grep -lR domain.tld /var/cpanel/userdata/*

jika muncul listnya, jalankan perintah dibawah ini untuk rebuild cache:

/scripts/updateuserdomains

October 19, 2013

Mod_rewrite di codeigniter

Filed under: CMS — dh @ 9:05 am

Mod_rewrite di codeigniter
refernsi: http://www.farinspace.com/codeigniter-htaccess-file/


 
    RewriteEngine On
    RewriteBase /
 
    ### Canonicalize codeigniter URLs
 
    # If your default controller is something other than
    # "welcome" you should probably change this
    RewriteRule ^(welcome(/index)?|index(\.php)?)/?$ / [L,R=301]
    RewriteRule ^(.*)/index/?$ $1 [L,R=301]
 
    # Removes trailing slashes (prevents SEO duplicate content issues)
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)/$ $1 [L,R=301]
 
    # Enforce www
    # If you have subdomains, you can add them to
    # the list using the "|" (OR) regex operator
    RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC]
    RewriteRule ^(.*)$ http://www.domain.tld/$1 [L,R=301]
 
    # Enforce NO www
    #RewriteCond %{HTTP_HOST} ^www [NC]
    #RewriteRule ^(.*)$ http://domain.tld/$1 [L,R=301]
 
    ###
 
    # Removes access to the system folder by users.
    # Additionally this will allow you to create a System.php controller,
    # previously this would not have been possible.
    # 'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]
 
    # Checks to see if the user is attempting to access a valid file,
    # such as an image or css document, if this isn't true it sends the
    # request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
 

 

 
    # Without mod_rewrite, route 404's to the front controller
    ErrorDocument 404 /index.php
 

Apply These Final Touches to Clean Up the URL

Remember, once you have your CodeIgniter htaccess file setup, you will want to go into your “/system/application/config/config.php”, find the following:

$config['index_page'] = "index.php";

and change it to:

$config['index_page'] = "";

September 1, 2013

Check Mod Security Version

Filed under: Securtiy,Server — Tags: — dh @ 6:17 pm

/scripts/restartsrv_httpd
grep "modsecurity" /usr/local/apache/logs/error_log

Output:

[Mon Sep 02 00:32:46 2013] [notice] ModSecurity for Apache/2.7.5 (http://www.modsecurity.org/) configured.

July 19, 2013

Instlall Iftop

Filed under: Stat — dh @ 8:07 am


yum -y install ncurses-devel libpcap-devel
cd /usr/local/src/
wget http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz
tar xvfvz iftop-*
cd iftop-*
./configure
make
make install

Referensi: http://xmodulo.com/2012/06/how-to-install-iftop-on-linux.html

July 18, 2013

Check Hard Drive Health In Linux With HDSentinel

Filed under: Server — Tags: — dh @ 3:55 am


cd /home/status/
wget http://www.hdsentinel.com/hdslin/hdsentinel_008_x64.zip
unzip hdsentinel*
chmod 755 HDSentinel
./HDSentinel

April 21, 2013

Disable Joomla User Registration

Filed under: CMS — dh @ 1:26 pm

disable use registration in Joomla 1.5
phpmyadmin > jos_component > User Manager > params > allowUserRegistration=0

disable use registration in Joomla 2.5
phpmyadmin > jos_extension > mod_user > params > allowUserRegistration=0

March 22, 2013

Migrasi Email Akun

Filed under: Email — dh @ 11:33 am

Code untuk migrasei email

http://snipplr.com/view/50756/transfer–migrate-messages-between-two-imappop-email-accounts/

March 21, 2013

Mod_evasive untuk Mengatasi DDOS

Filed under: Apache — Tags: — dh @ 4:00 am

Install Mod_Evasive untuk mengatasi DDOS

http://syslint.com/syslint/how-to-install-mod_evasive-in-cpanel-server/

October 9, 2012

More History

Filed under: Server — dh @ 5:47 am

15 Examples To Master Linux Command Line History

1. Display timestamp using HISTTIMEFORMAT

export HISTTIMEFORMAT='%F %T '

September 27, 2012

Menyembunyikan Icon di cPanel

Filed under: cPanel/WHM — dh @ 8:53 am

In order to get rid of icons (if you use x3):
1) in /usr/local/cpanel/base/frontend/x3/dynamicui/ create a new file called remove_items_dynamicui.conf
(the name of the file can actually be whatever as long as it includes dynamicui and is a .conf file, ex abc_dynamicui_xyz.conf)

2) enter one line for each item you do not want to show. For hiding mysql-remoteaccess, emailroute and legacy file manager, the following needs to be added:

file=>mysql-remoteaccess,skipobj=>1
file=>emailroute,skipobj=>1
file=>legacy_filemanager,skipobj=>1

You can find all file names to use for each icon in /usr/local/cpanel/base/frontend/x3/dynamicui.conf

« Newer PostsOlder Posts »

Powered by WordPress