- Update nginx conf (/etc/nginx/nginx.conf)
http {
...
...
real_ip_header X-Forwarded-For; # Get Client IP From X-Forwarded_For
set_real_ip_from 10.0.0.0/8; # AWS ELB ip ranges
...
...
http {
...
...
real_ip_header X-Forwarded-For; # Get Client IP From X-Forwarded_For
set_real_ip_from 10.0.0.0/8; # AWS ELB ip ranges
...
...
mysqldump -u xxx -p -Qce -R --apply-slave-statements --single-transaction —tz-utc --flush-privileges —master-data=2 --max-allowed-packet=900M --databases xxx|pv|gzip > dump.sql.gz |
/var/log/nginx/*log { | |
create 0644 nginx nginx | |
daily | |
rotate 10 | |
missingok | |
notifempty | |
compress | |
sharedscripts | |
postrotate | |
/bin/kill -USR1 `cat /run/nginx.pid 2>/dev/null` 2>/dev/null || true |
#!/usr/bin/env bash | |
# names of latest versions of each package | |
export NGINX_VERSION=1.11.5 | |
export VERSION_PCRE=pcre-8.38 | |
export VERSION_LIBRESSL=libressl-2.4.1 | |
export VERSION_NGINX=nginx-$NGINX_VERSION | |
export NGX_BROTLI_STATIC_MODULE_ONLY=1 | |
#export NPS_VERSION=1.9.32.10 | |
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta |
angular.module("kp.account") | |
/** | |
* @ngdoc directive | |
* @name kp.account.directive:kpNicknameValidation | |
* @description | |
* Defines validNickname method. | |
* length between 5-20,less than 5 digit numbers | |
*/ | |
.directive("kpNicknameValidation", function() { | |
return { |
#Basic
[Unit] | |
Description=supervisord - Supervisor process control system for UNIX | |
Documentation=http://supervisord.org | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf | |
ExecReload=/usr/bin/supervisorctl reload | |
ExecStop=/usr/bin/supervisorctl shutdown |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your location block(s): | |
# | |
# include cors_support; | |
# | |
# A limitation to this method is that Nginx doesn't currently send headers |
types { | |
text/html html htm shtml; | |
text/css css; | |
text/xml xml rss; | |
image/gif gif; | |
image/jpeg jpeg jpg; | |
application/x-javascript js; | |
application/atom+xml atom; | |
application/x-font-woff woff; |
SELECT table_name AS "table", | |
round(((data_length + index_length) / 1024 / 1024), 2) "size(MB)" | |
FROM information_schema.TABLES | |
WHERE table_schema = "$dbName" | |
ORDER BY (data_length + index_length) DESC; |