Permalink
Browse files

configs

  • Loading branch information...
sorah committed Oct 22, 2017
1 parent e7ea452 commit 781f7f69f93c4189b55fc96fd732108c857be681
Showing with 1,108 additions and 0 deletions.
  1. +78 −0 mysqld.cnf
  2. +87 −0 nginx.conf
  3. +943 −0 redis.conf
View
@@ -0,0 +1,78 @@
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
symbolic-links=0
max_allowed_packet=300M
## cache size
table_open_cache = 2000
thread_cache_size = 100
query_cache_type = 0
query_cache_size = 0
binlog_cache_size = 16M
max_heap_table_size = 64M
tmp_table_size = 64M
## slow query log
slow_query_log
slow_query_log_file = mysql-slow.log
log_slow_admin_statements
log_slow_slave_statements
long_query_time = 0.1
## innodb
#innodb_strict_mode
innodb_buffer_pool_size = 2G
#innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_buffer_size = 16M
innodb_log_file_size = 512M
innodb_doublewrite = 0
innodb_read_io_threads = 8
innodb_write_io_threads = 8
innodb_lock_wait_timeout = 5
innodb_support_xa = 1
innodb_autoinc_lock_mode = 2
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_file_per_table
innodb_file_format = Barracuda
innodb_print_all_deadlocks
innodb_large_prefix
## [mysqld-5.6] or [mysqld-5.7]
loose_performance_schema = OFF
loose_explicit_defaults_for_timestamp
loose_table_open_cache_instances = 8
## slow query log
loose_log_queries_not_using_indexes
loose_log_throttle_queries_not_using_indexes = 10
## innodb
loose_innodb_buffer_pool_dump_at_shutdown = 1
loose_innodb_buffer_pool_load_at_startup = 1
loose_innodb_monitor_enable = all
performance_schema = OFF
[mysqld_safe]
log-error=/var/log/mysql/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
View
@@ -0,0 +1,87 @@
user www-data;
pid /run/nginx.pid;
worker_processes 2;
worker_rlimit_nofile 12288;
events {
worker_connections 4096;
}
http {
log_format ltsv "status:$status"
"\ttime:$time_iso8601"
"\treqtime:$request_time"
"\tmethod:$request_method"
"\turi:$request_uri"
"\tprotocol:$server_protocol"
"\tua:$http_user_agent"
"\tforwardedfor:$http_x_forwarded_for"
"\thost:$remote_addr"
"\treferer:$http_referer"
"\tserver_name:$server_name"
"\tvhost:$host"
"\tsize:$body_bytes_sent"
"\treqsize:$request_length"
"\truntime:$upstream_http_x_runtime"
"\tapptime:$upstream_response_time";
access_log /var/log/nginx/access.log ltsv;
error_log /var/log/nginx/error.log warn;
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
open_file_cache max=100 inactive=20s;
tcp_nopush on;
#gzip on;
#gzip_min_length 1100;
#gzip_buffers 4 8k;
#gzip_types application/atom+xml text/plain text/css text/javascript application/json application/javascript;
#gzip_vary on;
#gzip_disable "MSIE [1-6]\.";
gzip_static on;
keepalive_timeout 65;
proxy_buffers 100 32k;
proxy_buffer_size 8k;
#upstream isuda {
# server unix:///tmp/unicorn-isuda.sock fail_timeout=0;
#}
#upstream isutar {
# server unix:///tmp/unicorn-isutar.sock fail_timeout=0;
#}
#upstream rosylilly {
# server 127.0.0.1:5060 fail_timeout=0;
#}
server {
listen 0.0.0.0:80 default_server;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
root /home/isucon/git/webapp/public;
try_files $uri @isuda;
location @app{
#proxy_pass http://127.0.0.1:5000;
proxy_pass @app;
#proxy_pass http://rosylilly;
}
#location /stars {
# #proxy_pass http://127.0.0.1:5001;
# proxy_pass http://isutar;
#}
}
}
Oops, something went wrong.

0 comments on commit 781f7f6

Please sign in to comment.