Wednesday, January 28, 2015

How to change a domain nameserver from squarespace to bluehost.

Yesterday, I have to change a domain nameserver from squarespace to bluehost. It takes at least 4 hours to find out the way ...

Why ?

Point 1: When I point nameserver to bluehost and trying to attach my domain it shows verified but verification required.

Point 2: Squarespace is a prebuilt site like wix.com . So it has no upload option by which I can verify it.

Point 3: The otherman who own this domain before not wish to give his password of old hosting..

Point 4: But he wants to help me anyway ...

So what I have to do ....
 
Just a trick ;) and it works perfectly ...


Monday, January 19, 2015

Increase Bandwidth for a domain

To increase the bandwidth you need to use WHM, not cPanel.

To do so go to your WHM Panel (http://serverhostname.com:2086) --> Limit Bandwidth Usage (under the 'Account Functions' section) --> Select the domain and press 'Limit' --> Increase the number and hit 'Change'

To make the domain have unlimited bandwidth, you can input 'unlimited' into the box and this will do this.

Hopefully that answers your question!

Sunday, January 18, 2015

How To Enable BoxTrapper In cPanel/WHM Server?

1) Login into WHM.
2) Click on Tweak Settings [see image below]


3) check/uncheck on BoxTrapper Spam Trap under email settings to enable/disable it. [see this image]

4) Save the settings.

That’s it!

How to enable SpamAssassin in cPanel/WHM

Spam filters are a very important part of any mail server. ServInt VPS accounts using the cPanel/WHM control panel come with SpamAssassin as part of the standard installation. The default configuration has SpamAssassin enabled.

If you need to reenable SpamAssassin:

  • In WHM, under Server Configuration on the top of the left-hand navigation bar, click on Tweak Settings.
  • Click the Mail tab. 
  • Select On for "Enable SpamAssassin spam filter."
Note: ServInt recommends leaving "Enable BoxTrapper spam trap" set to Off.

To force all the users on your VPS to use SpamAssassin:
  • Scroll down the left left hand navigation bar in WHM to Service Configuration and click on Exim Configuration Manager.
  • Select the SpamAssassin tab.
  • Set "Spam Assassin: Forced Global ON" to On
This will filter all of your email for spam.  It will not, however, force your users to do anything with it after it's filtered. It will simply mark spam as spam, nothing more.

cPanel temporary URL not working

When accessing cPanel temporary URL, at times you get a 404 error. This is even if the cPanel account is created & website content uploaded on the server. Monitoring apache error log file, it shows error as below.

File does not exist: /usr/local/apache/htdocs/~user

This happens when mod_userdir is enabled on the server. Apache’s mod_userdir allows users to view their sites by entering a tilde(~) and their username as the URL on a specific host. For example http://server-ip/~user/ will bring up the user user’s domain. The disadvantage of this feature is that any bandwidth usage used by this site will be put on the domain it is accessed under (in this case test.domain.com). mod_userdir protection prevents this from happening. You may however want to disable it on specific virtual hosts (generally shared ssl hosts.) When accessing with the temp URL nobody user has to be excluded from the mod_userdir restriction.
Login to your WHM as root & access option Security Center >> Apache mod_userdir Tweak. Uncheck for DefaultHost (nobody) & click on save. Try accessing the temporary URL now.

Note: Just write user in left hand search field and you get Apache mod_userdir ...

Wednesday, January 14, 2015

How to turn off php safe_mode off for a particular directory in a shared hosting environment?

Your service provider might have forgot to tell you that you need to enable your user defined php.ini configuration by adding this line in the .htaccess file that you find in your public_html folder:

#Activates php.ini config located in main folder to work also recursively for all subfolders
suPHP_ConfigPath
/home/YOUR_CPANEL_USER_NAME/public_html
 
Obviously replace YOUR_CPANEL_USER_NAME with your cPanel user name.
I'm supposing your server has got suPHP module(which is quite common in nowdays).
BTW: the php.ini file need to be in /home/YOUR_CPANEL_USER_NAME/public_html too and inside you should write this:
safe_mode = Off And remember that Safe Mode is deprecated in PHP 5.3.0 and is removed in PHP 6.0.0.
 

Saturday, January 10, 2015

Solutions for handling symlink attacks

1) He login to cPanel as a normal user http://ip-address/cpanel then type login and password to Login
2) Then he open File manager (show hidden files "dotfiles") and then creates new .htaccess file with following source:
#.htaccess file source
Options Indexes FollowSymLinks
DirectoryIndex doesnt-metter.htm
AddType txt .php
AddHandler txt .php

#End of .htaccess file
3) Then he creates symbalic link (soft link) with perl scripts or just uses CRON job to create symbalic link of top level directory "/" typing: "ln -s / topdir"
4) After that, he open browser and typing http://server-ip/~his-home-dir/topdi.../wp-config.php and then just looking source of the page, all data present as a TXT(text) data. That's all. User has been hacked.
-------------------------------------------------------------------------------------------------------
Solution:
1) Open you'r php.conf with you'r favorite editor: nano /usr/local/apache/conf/php.conf
2) Commit: #AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
3) Add these lines:
<FilesMatch "\.ph(p[2-6]?|tml)$"> # this equal to: .php, .php2, .php3, .php4, .php5, .php6 .phtml
SetHandler application/x-httpd-php5
</FilesMatch>

4) Save you'r changes and close php.conf
5) Restart httpd server typing: /etc/init.d/httpd restart
6) Done