ISPConfig LetsEncrypt Free SSL

Add SSL for ISPConfig Control Panel

To add SSL for ISPConfig control panel, add server hostname as a web site in ISPConfig and enable the LetsEnrypt checkbox. That will get SSL installed for your hostname. Make sure you verify hostname resolve to the ISPConfig server before doing this or SSL validation fail.

Once you have valid LetsEncrypt SSL certficate installed on your site, create file

Add following content

If you use nginx, replace apache2 on last line with nginx.

Now set a cronjob

Add

Now you should be able to access ISPConfig with url https://HOSTNAME:8080

Related Posts

ispconfig

Split Large file into smaller files

Today i was transfer a large 7 GB backp file into another server. Every time i copy it get disconnected after some time and i have to transfer again. When trasftering large file, it is better split it into smaller files, this way if one of the file trafer failed, you only need to trasfer this specific file again. With rsync, it make it easy as you can sync all files to remote server.

To split a large file into smaller parts, run

This command will split large file into smaller files with 500 MB size each. You can specify a differnt size if you need.

Once all files are on new server, you can combine it into one file with command

When you do cat *, make sure only split files are in current folder.

Related Posts

tar
rsync

ISPConfig

ISPConfig fail to create MySQL database

Whem creating MySQL database in ISPConfig, no database get created. To debug, i disabled the cronjob. Created a database in ISPConfig control panel, run cronjob manually, it shows following error

This is because ISPConfig can’t connect to MySQL server for creating new MySQL database. To fix, edit file /usr/local/ispconfig/server/lib/mysql_clientdb.conf

Update MySQL password for user root on this file. The content of the file look like

Related Posts

ISPConfig

ISPConfig

Install SSL for ISPConfig Control Panel

First find hostname for the server using command

Login to ISPConfig, add this web site. Get an SSL issued for this web site. Verify SSL works for this site.

Now create file

Add following content to the file

Excute the script

When you run first time, you may get missing file error, you can ignore it.

Set a cronjob

Related Posts

ISPconfig

VestaCP Free Hosting Control Panel

VestaCP SSL for mail server

VestaCP install self signed SSL for mail server by default. To install valid SSL, login to VestCP, go to sites. You will see a site with your sites hostname. If you don’t see it, create a site with your server hostname. Make sure DNS edited so hostname resolve to server IP. Now you should be able to get free LetsEncrypt SSL for this site.

if you check Apache Virtual Host for the site, you will see someting like

In VeataCP the config files for exim and dovecot located at

These configs use SSL located at /usr/local/vesta/ssl/certificate.crt and /usr/local/vesta/ssl/certificate.key.

To use the FREE SSL, create a bash script.

Add

make the file executable

Run the script

Now SSL will work for mail server and VestaCP. To access VestaCP, use

Verify Mail Server SSL

You can view mail server SSL with command

Replace HOSTNAME with actual hostname of your server.

Auto Renew SSL

LetsEncrypt SSL expire every 90 days. So we will create a cronjob to auto renew SSL. Ff you have a paid SSL, you don’t need this cronjob

Create a cronjob with

Add

Related Posts

VestaCP Free Hosting Control Panel

apropos

apropos is a linux command that search manual pages and descriptions.

Example

See Linux Commands

maximum number of open files and file descriptors in linux

To see open files in linux use the command

There is a limit set in the kernel on how many open file descriptors are allowed on the system. This may be compiled in, or it may be tunable on the fly. In Linux, the value of this parameter can be read from and written to the proc filesystem.

On this system 1,31,072 open file descriptors are permitted. We are unlikely to run out. If we wanted to change it, we’d do something like this:

But how do we know how many file descriptors are being used?

lighttpd too many open files

lighttpd server crashes with fllowing error in error_log file.

As lighttpd is a single-threaded server, its main resource limit is the number of file descriptors, which is set to 1024 by default (on most systems).

If you are running a high-traffic site you might want to increase this limit by setting server.max-fds.

Related Posts

lighttpd

maximum number of open files and file descriptors in linux

df not showing all mounts

On a server, df not showing all mounts

This is caused by corrupt /etc/mtab

To fix

See df