Skip to content

Category: Linux

How to apply restrictions per virtualhost in apache

If you are running apache on MPM Prefork, you can apply php restrictions for security or additional settings such as memory limit. Also, you can disable functions or php engine per directory or virtualhost. Standard virtualhost example: <VirtualHost *> DocumentRoot /home/tex/www/example.com ServerName example.com ServerAlias example.com ServerAdmin admin@example.com ErrorLog ${APACHE_LOG_DIR}/example.com-error_log CustomLog ${APACHE_LOG_DIR}/example.com-access_log combined </VirtualHost>   Virtualhost…

Installing nginx and php7 on Debian

First time, i will install nginx-extras (extended version of nginx): root@vm02:~# apt-get install nginx-extras   Adding dotdeb to apt sources list: root@vm02:~# echo “deb http://packages.dotdeb.org jessie all” >> /etc/apt/sources.list   Installing curl and adding dotdeb key for apt: root@vm02:~# apt-get install curl root@vm02:~# curl http://www.dotdeb.org/dotdeb.gpg | apt-key add – % Total % Received % Xferd…

Daily backup MySQL databases

I will use ‘mysql_config_editor’ for storing authentication credentials in an encrypted login path file named ‘.mylogin.cnf’. The file location is the ‘~/.mylogin.cnf’ (user home). The file can be read later by MySQL client programs to obtain authentication credentials for connecting to MySQL Server. The unencrypted format of the .mylogin.cnf login path file consists of option…

Ethernet RTL 8168 driver on CentOS

By default on CentOS 6.x is used 8169 instead of 8168 driver for Ethernet. Network device display (lspci output): [root@static89 ~]# lspci|grep Eth 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09) Loaded driver: [root@static89 ~]# lsmod|grep 816 r8169 74378 0 From dmesg output: r8169 Gigabit Ethernet driver 2.3LK-NAPI…