Contents

Debian server configuration

  1. Stack
  • Nginx 1.10.3 (apt-get -t jessie-backports install nginx-full)
  • Php 5.6 (apt-get install php5 php5-fpm php5-gd php5-json php5-mysql php5-curl php5-mcrypt)
  • MariaDB 10.0 => Mysql 5.6 (apt-get install mariadb-server)

Create user name password

  1. Directory
  • create website directory /var/www/name/101-website.address/public_html
  • create log directory /var/www/name/log/101-website.address/
  • create log directory /var/www/name/repository/branch_name/

  1. Nginx
  • change config to startup by name nginx.conf {% highlight nginx %} user name; http { … include /etc/nginx/sites-enabled/*.conf; … } {% endhighlight %}
  1. MariaDB
  • change config to startup by another gnerate port check not available ports my.cnf {% highlight nginx %} [client] port = 5xxxx …. [mysqld] … port = 5xxxx … {% endhighlight %}
  1. php-fpm
  • change config to startup by another name www.conf {% highlight bash %} … [www] … user = name group = name … listen.owner = name listen.group = name … {% endhighlight %}

  1. Change default port from 22 to random
  2. Jail
  • add new lines in /etc/ssh/sshd_config {% highlight nginx %} Match user name ChrootDirectory home/jail* X11Forwarding no AllowTcpForwarding no {% endhighlight %} restart