Archive for the Cpanel Issues Category

FTP over SSL setup in cPanel

As we know that SFTP can only be used to Secure FTP connnections for only cPanel users and not for regular FTP  accounts but for regular FTP accounts you can setup FTP over SSL/TLS

You can follow the below simple steps to  the same ::

 

Enable TLS Encryption support from WHM
WHM >> Main >> Service Configuration >> FTP Server Configuration

and set TLS Encryption Support to optional.

Once done that you can access FTP over  SSL by  using server type as ::  FTPES stands for FTP over explicit TLS/SSL

You can use the below settings to access FTP over SSL

 

Host  :: domain.com or IP

User  :: FTP user name

Pass  :: FTP password

Port  :: 21

Server Type ::  ftpes

example ::

fptes://domain.com

 

That’s all .

 

Change the default character set for Apache

By default, on most of the linux systems  the default character set for Apache is  UTF-8.  But what if your web application requires a different character set .

Say, if  all of your sites are in Spanish Language then you would most likely  to change this to the Latin-1 character set (ISO-8859-1)  .

 

So, follow the below steps to  change default charset for apache

 

1 > For all domains

Open  the /etc/httpd/conf/httpd.conf  file and search  for line ::

 

AddDefaultCharset UTF-8 

and replace with  the charset of your choice for example with  ISO-8859-1

 

AddDefaultCharset ISO-8859-1 

if the above line does not  exists in httpd.conf file then add that line

And finally restart the apache/httpd service for the changes to  take effect.

To verify  the new default charset for apache  use the below command ::

 

[email protected] [~]# curl -I localhost
HTTP/1.1 200 OK
Date: Wed, 04 Apr 2012 06:40:49 GMT
Server: Apache
Last-Modified: Sat, 31 Mar 2012 15:11:54 GMT
Accept-Ranges: bytes
Content-Length: 111
Content-Type: text/html; charset=ISO-8859-1

2 >  For a Single domain

 

If you want to change the charset for only a single domain then add the code :: AddDefaultCharset ISO-8859-1 in  the .htaccess file under the document root for that domain.

 

[email protected][~]# vi .htaccess
AddDefaultCharset ISO-8859-1
:wq!

That’s all you are done.

 

Script timed out before returning headers

Some times , it happens that your domain start  throwing 500 Internal Server Error all of a sudden and when you check  the apache error logs for that domain  you will get  the below errors in  the error logs    :::  Script timed out before returning headers 

 

And looking at the error, it seems the problem is with  the PHP  “max_execution_time”  variable setting and you have tried increasing  the max_execution_time value to a relatively higher value but it’s still showing the 500 Internal Server Error and now started to wonder how do I get rid of this problem then don’t panic because this can simply be resolved by following the below simple fix :

 

Login  to WHM >> Main >> Service Configuration >> Apache Configuration >> Global Configuration

and then set the “Timeout ” variable value to a litter higher value.

 

That’s all you are done.