Skip to content

Instantly share code, notes, and snippets.

[openresty]
name=Official OpenResty Repository
baseurl=https://copr-be.cloud.fedoraproject.org/results/openresty/openresty/epel-$releasever-$basearch/
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/openresty/openresty/pubkey.gpg
enabled=1
enabled_metadata=1
# MariaDB 10.2 CentOS repository list - created 2016-09-09 15:38 UTC
# http://downloads.mariadb.org/mariadb/repositories/
# WWW.MF8.BIZ
[mariadb]
name = MariaDB
baseurl = https://mirror.tuna.tsinghua.edu.cn/mariadb/yum/10.2/centos7-amd64/
gpgkey=https://mirror.tuna.tsinghua.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
@ivmm
ivmm / nginx.conf
Last active September 10, 2016 11:40
user www www;
worker_processes auto;
error_log /var/log/error_openresty.log crit;
pid /var/run/nginx.pid;
worker_rlimit_nofile 51200;
events {
use epoll;
worker_connections 51200;
@ivmm
ivmm / default.vcl
Last active April 30, 2017 14:39
default.vcl
# Based on:https://gist.githubusercontent.com/ivmm/243998f8fd888f28dfe2a9173447ffa8/raw/8bf3aedca049224e81779aca3621fc6d16d2c108/default.vcl
# 修改第 18行 的 mf8.biz 为你的域名
vcl 4.0;
import std;
backend default {
.host = "127.0.0.1";
.port = "80";
}
# Stop dance for OpenResty
# A modification of the Nginx systemd script
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the Nginx process.
# If, after 5s (--retry QUIT/5) OpenResty is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if OpenResty is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
user www-data;
worker_processes auto;
error_log /data/wwwlogs/error_nginx.log crit;
pid /run/openresty.pid;
worker_rlimit_nofile 51200;
events {
use epoll;
worker_connections 51200;
location / {
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name localhost;
location / {
proxy_pass http://127.0.0.1:9000;
}
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name localhost;
location / {
proxy_pass http://127.0.0.1:2368;
}
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
proxy_set_header X-Forwarded-For $remote_addr;
location / {
proxy_pass http://127.0.0.1:9000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;