28

✔ Аutomation of routine tasks on a new server for humans. Only verified configs...

 5 years ago
source link: https://www.tuicool.com/articles/hit/uMf63y3
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

✔ VDS Auto Config

Аutomation of routine tasks on a new server for humans . Only verified configs and best practices.

Just git clone and run it!

For GNU/Linux Debian 9 Stretch

Clone this repo:

$ git clone [email protected]:koddr/vdsac.git

Run init.sh from root dir:

$ cd vdsac
$ sudo chmod +x ./init.sh
$ sudo ./init.sh [OPTIONS]

Options

  • --webserver [NAME] — web server name, you want to install (support: nginx );
  • --python [VERSION] — Python 3 version, you want to install (support: 3.5.x , 3.6.x , 3.7.x )

Nginx configuration

user nginx;
worker_processes auto;

events {
    use epoll;
    worker_connections 1024;
    multi_accept on;
}

http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    access_log off;
    error_log /var/log/nginx/error.log crit;
    server_tokens off;

    keepalive_timeout 30;
    keepalive_requests 100;

    reset_timedout_connection on;
    client_body_timeout 10;
    send_timeout 2;
    sendfile on;
    tcp_nodelay on;
    tcp_nopush on;

    client_max_body_size 1m;

    open_file_cache max=200000 inactive=20s;
    open_file_cache_valid 30s;
    open_file_cache_min_uses 2;
    open_file_cache_errors on;

    gzip on;
    gzip_comp_level 5;
    gzip_disable "msie6";
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml image/gif image/png image/jpeg image/x-icon image/webp;

    include /etc/nginx/conf.d/*.conf;
}

Enjoy the configured server :tada:

UBrMJz7.png!web


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK