worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 0;
gzip on;
gzip_min_length 1k;
gzip_buffers 16 64k;
gzip_http_version 1.1;
gzip_comp_level 6;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
server {
listen 443;
server_name api.example.com;
ssl on;
ssl_certificate server-key/server.pem;
ssl_certificate_key server-key/server.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:8888;
}
}
server {
listen 80;
server_name redirect.yunpian.easybao.com;
location / {
proxy_pass https://sms.yunpian.com;
}
}
server {
listen 80;
server_name redirect.yunpianvoice.example.com;
location / {
proxy_pass https://voice.yunpian.com;
}
}
server {
listen 443;
server_name redirect.hs.easybao.com;
location / {
proxy_pass https://vopen.hscloud.cn;
}
}
server{
listen 80;
server_name redirect.umeng.example.com;
location / {
proxy_pass http://msg.umeng.com;
}
}
# Enable nginx status
server {
listen 55777;
location /nginx_status {
stub_status on;
access_log off;
#allow 127.0.0.1;
#allow 10.24.34.53; # Put your zabbix_mon zabbix monitoring server here
#deny all;
}
}
}
stream {
upstream backend {
server 122.224.243.187:1567 max_fails=3 fail_timeout=30s;
}
server {
listen 1567;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass backend;
}
}
NGINX-配置例子01
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
相關(guān)閱讀更多精彩內(nèi)容
- 大家好,我是IT修真院成都分院第7期的JAVA學(xué)員龔劍飛,一枚正直純潔善良的java程序員。 今天給大家分享一下,...