ini quakelive conf

quakelive conf

autoexec.conf
unbindall

r_smp 1
// Punkbuster

seta cl_punkbuster	"1"
seta pb_system		"1"
seta pb_security	"0"
seta pb_sleep		"500"
seta pb_cl_enable	"1"

// net settings
seta rate           25000
seta snaps          40  // let osp cap snaps to value of sv_fps
seta cl_maxpackets  125 // leased line, need BW for this
seta cl_packetdup   0   // duplicate packet checksums 5 times to avoid any PL
seta cl_nodelta     0


// imported
// cg_hudfiles     "ui/emsixteen.cfg"  // My HUD!
cg_hudfiles     "ui/xpk_hud_2.cfg"
loadhud

cg_kickscale    "0"                 // Stops the screen from shaking when taking damage
cg_bob          "0"                 // Makes your screen stay straight when jumping and hitting the ground
cg_levelTimerDirection "1"         // 0 = up, 1 = down
cg_newWeaponBar     "0"
s_ambient       "0"         // Removes ambient sounds like rain on qztourney7
s_musicvolume   "0"         // Nobody wants that music..
cg_railTrailTime "1500"
cg_crosshairpulse "0"


// duck / team msgs
// bind CTRL    "say_team ^1>>>^7 ^1YOU ^7take!!!"
bind ALT    +movedown


// net settings, used by pressing numlock to toggle between them, if playing on a euro server
bind kp_numlock "vstr net1"
set         net1        "cl_timenudge -15; snaps 60; cl_maxpackets 125; rate 25000; cl_nodelta 1; cl_packetdup 0; echo ^3TIMENUDGE -15; echo ^2SNAPS 60; echo CL_MAXPACKETS 125; echo RATE 25000; bind kp_numlock vstr net2; echo ^3next change: ^5LOW BAND ^7SETTINGS";
set         net2        "cl_timenudge -15; snaps 40; cl_maxpackets 125; rate 12500; cl_nodelta 0; cl_packetdup 2; echo ^3TIMENUDGE -15; echo ^2SNAPS 40; echo CL_MAXPACKETS 125; ECHO rate 12500; bind kp_numlock vstr net1; echo ^3next change: ^5LOW BAND ^7SETTINGS";

// toggle for my middle mouse button between 'taken item' and 'use' for ctf2.
bind kp_slash   "vstr tookitem"
set         useitem     "bind mouse4 +button2; echo ^2enabled ^4ITEM USE; bind kp_slash vstr tookitem"
set         tookitem    "bind mouse4 say_team ^1>>>^7 TAKEN ^3; echo ^2enabled ^4ITEM TAKEN; bind kp_slash vstr useitem"

// ctf tactical calls for changing squad formation, use 8 to select a formation and 9 to call it.
bind 8      "vstr formation1"
set formation1  "echo formation: ^31-1-3; bind 9 say_team ^1>^2>^3> ^7MOVE TO: ^31-1-3; bind 8 vstr formation2";
set formation2  "echo formation: ^32-1-2; bind 9 say_team ^1>^2>^3> ^7MOVE TO: ^12-1-2; bind 8 vstr formation3";
set formation3  "echo formation: ^32-3; bind 9 say_team ^1>^2>^3> ^7MOVE TO: ^22-3; bind 8 vstr formation4";
set formation4  "echo formation: ^32-3; bind 9 say_team ^1>^2>^3> ^7MOVE TO: ^61-2-2; bind 8 vstr formation1";

// teamplay binds, CTF
// powerup related
bind =      "say_team ^1>>>^7 ^1get ^7POWERUP ^1now!"
bind ]      "say_team ^1>>>^7 we are quad / POWERUP ended"
bind e      "say_team ^1>>>^7 N.M.E ^1REGEN"
bind q      "say_team ^1>>>^7 N.M.E ^4QUAD"
bind w      "say_team ^1>>>^7 N.M.E ^5NUKE INCOMMING"
// bind ALT "say_team ^1>>>^7 ^1get ^4QUAD^7/^3HASTE"

// attack related, light blue ident >>>
bind a      "say_team ^5>>>^7 ATTACKING"
bind v      "say_team ^5>>>^7 RUSH ^4MID^7 for FC passage"
bind \      "say_team ^5>>>^7 RUSH enemy base in ^410 secs"
bind z      "say_team ^5>>>^7 WAITING FOR HELP ^4#l"
bind kp_HOME   "say_team ^1>>>^7 HELP NEED/AVAIL ^1low ^7#L"
bind kp_END    "say_team ^1>>>^7 HELP NEED/AVAIL ^6high ^7#L"

// info based / misc
// base related, leaving/coming attackers
bind x      "say_team ^1>>>^7 LOST ^3BASE"
bind c      "say_team ^3>>>^7 SAFE ^3BASE"
bind kp_pgdn    "say_team ^1>>>^7 IN/OUT ^1low"
bind kp_pgup    "say_team ^1>>>^7 IN/OUT ^1high"

// personal status / info
bind y      "say_team ^3>>>^7 YES / ON WAY"
bind [      "say_team ^3>>>^7 NO / CAN'T MAKE IT" //'
bind BACKSPACE  "kill"
bind s      "say_team ^3>>>^7 ^3H:#h A:#a #w"

// positional info
bind b      "say_team ^1>>>^7 DIED near, ^7area ^1LOST"
bind m      "say_team ^1>>>^7 LOST AREA, ^1UNSAFE"
bind n      "say_team ^3>>>^7 ^3SECURED"
bind ENTER  dropflag
bind BACKSPACE droppowerup


// sharing items
bind g      "say_team ^1>>>^7 FREE ITEM HERE"
bind uparrow "say_team ^1>>>^7 ^1YOU ^7take!!!"
bind downarrow dropweapon
bind leftarrow "say_team ^3>>>^7 AVAILABLE";

// hurt enemies
bind SHIFT  "say_team ^1>>>^7 ENEMY ^1LOW ON HEALTH"

// personal positioning, for when helping in base, etc.
bind PGDN   "say_team ^3>>>^7 SWAP ME here now"
bind PGUP   "say_team ^3>>>^7 is MY AREA now"

// generic binds, info etc
bind ESCAPE     "togglemenu"
bind t      "messagemode"
bind r      "messagemode2"
bind `      "toggleconsole"
bind TAB    "+scores"
bind 1      "+acc"
bind 2      "topshots"
bind 3      "stat"
bind 4      "players"

set soundOn "s_volume 0.1;echo SOUND ON;bind PAUSE vstr soundOff"
set soundOff "s_volume 0;echo SOUND OFF;bind PAUSE vstr soundOn"
bind PAUSE  "vstr soundOff"

bind F1     "vote yes"
bind F2     "vote no"
bind F3     "readyup"
bind F4     "toggle r_fastsky" // for w2 and dm7 gateways see-through
bind F5     "team r"
bind F6     "team b"
bind F7     "team a"
bind F8     "in_restart"
bind F9     "vid_restart"
bind F10    "toggle r_vertexlight;vid_restart"
bind F11    "stoprecord"`
bind F12    "screenshotjpeg"

// suicide with a message in case dropping flag
bind *      "kill; say_team ^3>>> ^7SUICIDE"

// weapon binds, all with gun drawn cept for rl. can also add alterating FOVs here
set w1      "m_pitch 0.0220; cg_drawgun 2; cg_drawcrosshair 13; cg_fov 115; weapon 1; set lw vstr w1"
set w2      "m_pitch 0.0220; cg_drawgun 2; cg_drawcrosshair 13; cg_fov 115; weapon 2; set lw vstr w2"
set w3      "m_pitch 0.0220; cg_drawgun 2; cg_drawcrosshair 13; cg_fov 115; weapon 3; set lw vstr w3"
set w4      "m_pitch 0.0220; cg_drawgun 2; cg_drawcrosshair 13; cg_fov 115; weapon 4; set lw vstr w4"
set w5      "m_pitch 0.0220; cg_drawgun 0; cg_drawcrosshair 13; cg_fov 125; weapon 5; set lw vstr w5"       // RL = hide weapon
set w6      "m_pitch 0.0154; cg_drawgun 2; cg_drawcrosshair 13; cg_fov 120; weapon 6; set lw vstr w6"        // shaft
set w7      "m_pitch 0.0154; cg_drawgun 2; cg_drawcrosshair 13; cg_fov 115; weapon 7; set lw vstr w7"       // rail
set w8      "m_pitch 0.0220; cg_drawgun 2; cg_drawcrosshair 16; cg_fov 115; weapon 8; set lw vstr w8"       // plasma
set w9      "m_pitch 0.0220; cg_drawgun 2; cg_drawcrosshair 13; cg_fov 115; weapon 9; set lw vstr w9"
set w10     "m_pitch 0.0220; cg_drawgun 2; cg_drawcrosshair 13; cg_fov 115; weapon 10; set lw vstr w10"

bind .      "vstr w7"
bind /      "vstr w5"
bind 0      "vstr w1"
bind 5      "vstr w5"
bind 6      "vstr w6"
bind 7      "vstr w7"
bind :      "vstr w10"
bind SEMICOLON  "vstr w6"
bind i      "vstr w8"
bind o      "vstr w3"
bind h      "vstr w2"
bind u      "weapon 4;wait 100;+attack;wait 10;-attack;vstr lw"  // quick grenade

// movement and shoot
bind j      "+moveleft"
bind k      "+back"
bind l      "+moveright"
bind SPACE  "+moveup"
bind MOUSE1     "+attack"
bind MOUSE2     "+forward"
bind MOUSE3     "+button2"
bind MWHEELDOWN "weapprev"
bind MWHEELUP   "weapnext"

// model and team model colours
cg_forceTeamModel	"biker"
cg_forcemodel		"1"
// color "4444"
color1 "1"
color2 "1"
cg_enemyColors "33322"
cg_enemyModel "keel/bright"


seta com_allowConsole "1"
// r_enablePostProcess 0
//r_vertexLight 1
r_subdivisions 50
// r_mode 5
cg_weaponColor 0x0000ff
cg_weaponColorStyle 2
cl_allowConsoleChat 1
cg_impactSparks 0


set nopb "pb_sleep 500;pb_security 0;echo Fixed Punkbuster"
bind 4 "vstr nopb"

exec qlranks-elo.cfg

ini Apache站点配置模板

Apache站点配置模板

website.conf
<VirtualHost *:80>
        ServerName wbase.websiteserverbox
        ServerAlias www.wbase.websiteserverbox blogbase.websiteserverbox www.blogbase.websiteserverbox
        ServerAdmin admin@website.de

        DocumentRoot /var/www-data


        DirectoryIndex index.php index.html


        LogLevel Warn
        LogFormat vhost_common

        CustomLog /var/log/apache2/websitewbase.access.log vhost_common
        ErrorLog /var/log/apache2/websitewbase.error.log


        <Directory /var/www-data>
                Options FollowSymLinks
                Require all granted
                AllowOverride All
                php_admin_value error_log /var/www-data/php-errors.log
                php_admin_flag log_errors On
                php_admin_flag session.gc_probability 1
        </Directory>



</VirtualHost>

ini apache2允许访问受密码保护的文件夹

apache2允许访问受密码保护的文件夹

apache2-allow-access-to-password-protected-folder.conf
<Directory "/path-to-protected">
	
	AuthType Basic
	AuthName "auth"
	AuthUserFile "/auth-user-file-path"
	require valid-user

	SetEnvIf Request_URI "path-to-allow" allowed_restricted
	
	Order allow,deny
	Allow from 1.2.3.4  # allow from some ips
	Allow from env=allowed_restricted # allow from some urls
	Satisfy any
	
</Directory>

ini .tmux.conf

.tmux.conf
# Send prefix
set-option -g prefix C-a
bind-key C-a send-prefix

# Use Alt-arrow keys to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window

# Mouse mode
set -g mouse on
#set -g mouse-resize-pane on
#set -g mouse-select-pane on
#set -g mouse-select-window on

# Set easier window split keys
bind-key v split-window -h
bind-key h split-window -v

# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"

ini Firefox - Vim Vixen配置

Firefox - Vim Vixen配置

firefox-vim-vixen.cfg
{
  "keymaps": {
    "0": { "type": "scroll.home" },
    ":": { "type": "command.show" },
    "o": { "type": "command.show.open", "alter": false },
    "O": { "type": "command.show.open", "alter": true },
    "t": { "type": "command.show.tabopen", "alter": false },
    "T": { "type": "command.show.tabopen", "alter": true },
    "w": { "type": "command.show.winopen", "alter": false },
    "W": { "type": "command.show.winopen", "alter": true },
    "b": { "type": "command.show.buffer" },
    "a": { "type": "command.show.addbookmark", "alter": true },
    "k": { "type": "scroll.vertically", "count": -1 },
    "j": { "type": "scroll.vertically", "count": 1 },
    "h": { "type": "scroll.horizonally", "count": -1 },
    "l": { "type": "scroll.horizonally", "count": 1 },
    "<C-U>": { "type": "scroll.pages", "count": -0.5 },
    "<C-D>": { "type": "scroll.pages", "count": 0.5 },
    "<C-B>": { "type": "scroll.pages", "count": -1 },
    "<C-F>": { "type": "scroll.pages", "count": 1 },
    "gg": { "type": "scroll.top" },
    "G": { "type": "scroll.bottom" },
    "$": { "type": "scroll.end" },
    "d": { "type": "tabs.close" },
    "!d": { "type": "tabs.close.force" },
    "u": { "type": "tabs.reopen" },
    "K": { "type": "navigate.history.next", "count": 1 },
    "J": { "type": "navigate.history.prev", "count": 1 },
    "gT": { "type": "tabs.prev", "count": 1 },
    "gt": { "type": "tabs.next", "count": 1 },
    "g0": { "type": "tabs.first" },
    "g$": { "type": "tabs.last" },
    "<C-6>": { "type": "tabs.prevsel" },
    "r": { "type": "tabs.reload", "cache": false },
    "R": { "type": "tabs.reload", "cache": true },
    "zp": { "type": "tabs.pin.toggle" },
    "zd": { "type": "tabs.duplicate" },
    "zi": { "type": "zoom.in" },
    "zo": { "type": "zoom.out" },
    "zz": { "type": "zoom.neutral" },
    "f": { "type": "follow.start", "newTab": false },
    "F": { "type": "follow.start", "newTab": true, "background": false },
    "H": { "type": "tabs.prev" },
    "L": { "type": "tabs.next" },
    "[[": { "type": "navigate.link.prev" },
    "]]": { "type": "navigate.link.next" },
    "gu": { "type": "navigate.parent" },
    "gU": { "type": "navigate.root" },
    "gi": { "type": "focus.input" },
    "gf": { "type": "page.source" },
    "y": { "type": "urls.yank" },
    "p": { "type": "urls.paste", "newTab": false },
    "P": { "type": "urls.paste", "newTab": true },
    "/": { "type": "find.start" },
    "n": { "type": "find.next" },
    "N": { "type": "find.prev" },
    "<S-Esc>": { "type": "addon.toggle.enabled" }
  },
  "search": {
    "default": "duckduckgo",
    "engines": {
      "google": "https://google.com/search?q={}",
      "yahoo": "https://search.yahoo.com/search?p={}",
      "bing": "https://www.bing.com/search?q={}",
      "duckduckgo": "https://duckduckgo.com/?q={}",
      "twitter": "https://twitter.com/search?q={}",
      "wikipedia": "https://en.wikipedia.org/w/index.php?search={}"
    }
  },
  "properties": {
    "hintchars": "abcdefghijklmnopqrstuvwxyz",
    "smoothscroll": false,
    "adjacenttab": true
  },
  "blacklist": [
  ]
}

ini Nginx负载均衡

load_balancing.conf
# Nginx 实现负载均衡 Load balancing
# 参考文档 http://nginx.org/en/docs/http/load_balancing.html

# 由于并不是真实环境,所以测试用的 vincent.com 只能在本地的 hosts 文件中做一下设置
# 127.0.0.1 vincent.com

http {
    # 轮询是默认的负载方案
    upstream vincent.com {
        server 127.0.0.1:3001;
        server 127.0.0.1:3002;
        server 127.0.0.1:3003;
    }

    # 最少连接数的负载方案,请求会被转发到连接数最少的服务器上
    # upstream vincent.com {
    #     least_conn;
    #     server 127.0.0.1:3001;
    #     server 127.0.0.1:3002;
    #     server 127.0.0.1:3003;
    # }

    # IP地址哈希负载方案
    # 前面的两种负载均衡方案中,同一客户端连续的Web请求可能会被分发到不同的后端服务器进行处理。
    # 因此如果涉及到会话Session,那么会话会比较复杂。常见的是基于数据库的会话持久化。
    # 要克服上面的难题,可以使用基于IP地址哈希的负载均衡方案。这样的话,由于同一客户端连续的
    # Web请求的IP地址都是一样的,那么他们的哈希值也是一样的,都会被分发到同一服务器进行处理。
    # upstream vincent.com {
    #     ip_hash;
    #     server 127.0.0.1:3001;
    #     server 127.0.0.1:3002;
    #     server 127.0.0.1:3003;
    # }

    # 基于权重的负载方案
    # 基于权重的负载均衡即 Weighted Load Balancing。
    # 这种方式下,我们可以配置Nginx把请求更多地分发到高配置的后端服务器上,
    # 把相对较少的请求分发到低配服务器。
    # upstream vincent.com {
    #     server 127.0.0.1:3001 weight=1;
    #     server 127.0.0.1:3002 weight=2;
    #     server 127.0.0.1:3003 weight=3;
    # }

    server {
        listen 80;
        server_name vincent.com;
        location / {
            proxy_pass         http://vincent.com;
            proxy_set_header   Host            $host;
            proxy_set_header   X-Real-IP       $remote_addr;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }
}

ini MongoDB中的设定档案

MongoDB中的设定档案

mongod.cfg
systemLog:
    destination: file
    path: MongoDB安裝路徑下/log/目錄
storage:
    dbPath: MongoDB下/data/目錄
security:
    authorization: enabled
net:
    bindIp: 0.0.0.0
    port: 27017

ini Nginx多端口映射

nginx.conf
# Nginx 实现多端口映射,省略部分默认配置
# 分别将 uat1.vincent.com uat2.vincent.com uat3.vincent.com 转发至本机的 3001 3002 3003 端口

http {
    server {
        listen 80;
        server_name uat1.vincent.com;
        location / {
            proxy_pass http://127.0.0.1:3001;
        }
    }
    server {
        listen 80;
        server_name uat2.vincent.com;
        location / {
            proxy_pass http://127.0.0.1:3002;
        }
    }
    server {
        listen 80;
        server_name uat3.vincent.com;
        location / {
            proxy_pass http://127.0.0.1:3003;
        }
    }
}

ini site.conf

site.conf
<virtualhost *:80>
    ServerName aaraza.me

    WSGIDaemonProcess webtool user=www-data group=www-data threads=5 home=/var/www/personal-site/
    WSGIScriptAlias / /var/www/personal-site/site.wsgi

    <directory /var/www/personal-site>
        WSGIProcessGroup webtool
        WSGIApplicationGroup %{GLOBAL}
        WSGIScriptReloading On
        Order deny,allow
        Allow from all
    </directory>
</virtualhost>

ini nginx.conf

nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   75;
    types_hash_max_size 2048;
    server_tokens       off;


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

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


    add_header          Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
    add_header          X-Content-Type-Options nosniff;
    add_header          X-Frame-Options SAMEORIGIN;
    add_header          X-XSS-Protection "1; mode=block";

    ssl_stapling on;
    ssl_stapling_verify on;

    pagespeed on;
    pagespeed FileCachePath "/path/to/cache";
    pagespeed RewriteLevel OptimizeForBandwidth;
    #优化
    ## 启用压缩空白过滤器
    pagespeed EnableFilters collapse_whitespace;
    # 启用JavaScript库卸载
    pagespeed EnableFilters canonicalize_javascript_libraries;
    # 把多个CSS文件合并成一个CSS文件
    pagespeed EnableFilters combine_css;
    # 把多个JavaScript文件合并成一个JavaScript文件
    pagespeed EnableFilters combine_javascript;
    # 删除带默认属性的标签
    pagespeed EnableFilters elide_attributes;
    # 改善资源的可缓存性
    pagespeed EnableFilters extend_cache;
    # 更换被导入文件的@import,精简CSS文件
    pagespeed EnableFilters flatten_css_imports;
    pagespeed CssFlattenMaxBytes 5120;
    # 延时加载客户端看不见的图片
    pagespeed EnableFilters lazyload_images;
    # 启用JavaScript缩小机制
    pagespeed EnableFilters rewrite_javascript;
    # 启用图片优化机制,可能会压缩你的logo
    # pagespeed EnableFilters rewrite_images;
    # 预解析DNS查询
    pagespeed EnableFilters insert_dns_prefetch;
    # 重写CSS,首先加载渲染页面的CSS规则
    pagespeed EnableFilters prioritize_critical_css;

    #缓存设置
    proxy_cache_path /data/www/cache levels=1:2 keys_zone=one:10m max_size=500m inactive=24h use_temp_path=off;
    # proxy_cache_key "$scheme$request_method$host$request_uri";

    # 开启gzip
    gzip on;
    # 启用gzip压缩的最小文件,小于设置值的文件将不会压缩
    gzip_min_length 1k;
    # gzip 压缩级别,1-10,数字越大压缩的越好,也越占用CPU时间,后面会有详细说明
    gzip_comp_level 2;
    # 进行压缩的文件类型。javascript有多种形式。其中的值可以在 mime.types 文件中找到。
    gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss application/json;
    # 是否在http header中添加Vary: Accept-Encoding,建议开启
    gzip_vary on;
    gzip_proxied   expired no-cache no-store private auth;
    # 禁用IE 6 gzip
    gzip_disable "MSIE [1-6]\.";

    #ETag
    etag on;

  server {
    listen              80;
    listen              [::]:80;
    server_name         zinai.xyz www.zinai.xyz;
    return 301          https://zinai.xyz$request_uri;
    return 301          https://www.zinai.xyz$request_uri;
    }

# Settings for a TLS enabled server.

   server {
       listen       443 ssl http2 default_server;
       listen       [::]:443 ssl http2 default_server;
       server_name  zinai.xyz www.zinai.xyz;
       root         /path/to/yoursite;

       ssl_certificate "/path/to/yourcrt";
       ssl_certificate_key "/path/to/yourkey";
       ssl_session_cache shared:SSL:10m;
       ssl_session_timeout  10m;
       ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置
       ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; #按照这个套件配置
       ssl_prefer_server_ciphers on;

       pagespeed SslCertDirectory /etc/pki/tls/certs;
       pagespeed SslCertFile /etc/pki/tls/cert.pem;

       # Load configuration files for the default server block.
       include /etc/nginx/default.d/*.conf;

       location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
        add_header "" "";
        }

        location ~ "^/pagespeed_static/" { }
        location ~ "^/ngx_pagespeed_beacon$" { }

        location / {
            proxy_cache one;
            proxy_cache_valid  200 206 304 301 302 10d;
            proxy_cache_key $uri;
            proxy_set_header Host $host:$server_port;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

        #404公益
       error_page 404 /404.html;
        location = /404.html {
          root /path/to/your404page;
        }

       error_page 500 502 503 504 /50x.html;
           location = /50x.html {
       }
   }

}