MySQL

Disable MySQL bin log on Bitnami

if you have cloud sevrer with less disk space, it is better disable MySQL bin log as it take approx 3 GB of disk space on bitnami server.

To disable MySQL binlog, edit mysql config file.

Find

Add below

Here is what i have in the my.cnf

Now restart MySQL

You can now remove the file starting with binlog from folder /opt/bitnami/mysql/data

python

error: Python.h: No such file or directory

When install dlib python module, i get error

This is because missing python3-dev package. To fix, install

If you are using python virtualenv, you will need to recreate the virtualenv after installing dev package.

Mac

To list all packages installed with brew

To see if a specific package installed, run

List open ports

Restart apache2

Disable Apache from starting on boot

Or

php programming

HTTP 301 Redirect using PHP

You can use PHP header() function to do redirect.

To do 301 redirect, use

For 302 redirect, use

If you need to redirect a site to new site keeping same URL structure, you can use

Nginx Web Server

Nginx HTTP 414 request-URI too large

On a Nginx server, when accessing a long url, i get error

Nginx HTTP 414 request-URI too large

To fix the error, edit

inside “http” section, find

Replace the line with

If your URL is very large, you may need to increase the 32k to higher or reduce the url length.

Large url like this mostly happend due to bad application design, so if possible try to make URL smaller.

Restart nginx

On older servers (centos 6, ubuntu 14, etc..), run

postfix mail server

Postfix email forward

On an Ubuntu Server, i done following to setup email forwarding.

Install postfix

Edit /etc/postfix/main.cf, add following

Add

Create Virtual mailbox

Add

Create alias file, used for mail forwarding

Add

Wth above configuration, mail coming to [email protected]_HERE.com will get forwarded to [email protected] Email coming to [email protected]_HERE.com get delivered to local mailbox folder.

Now run following commands to make hashmap

Restart postfix

EasyEngine upgrade

Upgrade EasyEngine

To upgrade EasyEngine, run

It is recommended you run this in tmux or screen to avoid disconnection while upgrading.

EasyEngine upgrade

Example

Related Posts

EasyEngine

MySQL server has gone away

When restoring a MySQL database, i get error “MySQL server has gone away”.

To fix this, edit MySQL configuration file. Add following line under [mysqld] section.

Restart MySQL

If you use MariaDB

Related Posts

MySQL

iredmail increase mail attachment size

Default mail attachment size in iredmail is 10 MB. To increase mail attachment size, login to server as user root, run following commands

Here 104857600 is 100 MB in bytes (100 * 1024 * 1024). Change this as required. Sending very large file using mail attachment is not recommended, it is better use file sharing services like Google Drive, Dropbox, Microsoft OneDrive or another file hosting service for sharing large files.

Now edit php.ini file

Change value for 3 of the following settings. It can be anything above 100 MB or whatever attachment size you want to use.

Restart php-fpm

Edit roundcube configuration file

Set value for

Edit Nginx config file

Set value for

restart nginx