Pixiv-Nginx/conf/nginx.conf

56 lines
2.1 KiB
Nginx Configuration File
Raw Normal View History

2018-09-17 18:29:24 +08:00
#user nobody;
2024年12月4日更新 (#80) * Add files via upload Update the upstream of Steam, Pixiv, E-hentai Add Server : Discord (IPv4) Instagram (IPv6 Only, Local DNS rewrite required to rewrite all subdomains) WallHaven (IPv4, image CDN Only, excluding pages) Reddit (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitter (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitch (IPv4, Local DNS And DoH were required to rewrite all subdomains) GoogleCDN (File Server IPv6 Only, website pages and IPv4 servers were not included, Local DNS rewrite required to rewrite all subdomains) * Update the self-signed certificate config self-signed certificate * Update README.md * 更换NGINX版本 * 配置文件(2024年08月31日18时11分 配置文件(2024年08月31日18时11分 1、更新部分上游服务器 2、改进KeepAlive参数,提升访问可靠性 * 改进部分上游服务器写法,避免了可能导致"not signaled for 5s"停止的问题 * 改进部分上游服务器写法 * Update the domains * 增加FaceBook反向代理 配置文件(2024年09月14日14时00分 1、修复部分上游服务器 2、新增FaceBook反向代理(仅IPv6,需要本地dns进行批量dns重写 * 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 * 更新子证书内容,以支持FaceBook 更新子证书内容,以支持FaceBook * Delete facebook * Delete conf/Reddit.conf * Delete conf/Twitch.conf * Delete conf/Twitter.conf * Delete conf/instagram.conf * Delete conf/Twitter.params * Delete conf/Twitch.params * Delete conf/Discord.conf * 更新steam上游 * 2024年10月17日更新 更新Steamd的FastlyCDN和imgur * Delete conf/DLsite.conf * Delete conf/SteamCDN.params * Delete conf/Discord.conf * Delete conf/key.pem * Delete conf/cert.pem * Delete conf/pixiv.conf * 更新Pixiv服务器上游IP * Delete conf directory then reload * rename and rebuild the conf * 更新日志 * 自签证书★使用说明★ * Delete 备用文件 directory * Update nginx.conf * Update and rename Hosts to host * Delete hosts * Update and rename host to hosts
2024-12-04 21:33:21 +08:00
#worker_cpu_affinity auto;
worker_processes 2;
2018-09-17 18:29:24 +08:00
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
events {
2024年12月4日更新 (#80) * Add files via upload Update the upstream of Steam, Pixiv, E-hentai Add Server : Discord (IPv4) Instagram (IPv6 Only, Local DNS rewrite required to rewrite all subdomains) WallHaven (IPv4, image CDN Only, excluding pages) Reddit (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitter (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitch (IPv4, Local DNS And DoH were required to rewrite all subdomains) GoogleCDN (File Server IPv6 Only, website pages and IPv4 servers were not included, Local DNS rewrite required to rewrite all subdomains) * Update the self-signed certificate config self-signed certificate * Update README.md * 更换NGINX版本 * 配置文件(2024年08月31日18时11分 配置文件(2024年08月31日18时11分 1、更新部分上游服务器 2、改进KeepAlive参数,提升访问可靠性 * 改进部分上游服务器写法,避免了可能导致"not signaled for 5s"停止的问题 * 改进部分上游服务器写法 * Update the domains * 增加FaceBook反向代理 配置文件(2024年09月14日14时00分 1、修复部分上游服务器 2、新增FaceBook反向代理(仅IPv6,需要本地dns进行批量dns重写 * 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 * 更新子证书内容,以支持FaceBook 更新子证书内容,以支持FaceBook * Delete facebook * Delete conf/Reddit.conf * Delete conf/Twitch.conf * Delete conf/Twitter.conf * Delete conf/instagram.conf * Delete conf/Twitter.params * Delete conf/Twitch.params * Delete conf/Discord.conf * 更新steam上游 * 2024年10月17日更新 更新Steamd的FastlyCDN和imgur * Delete conf/DLsite.conf * Delete conf/SteamCDN.params * Delete conf/Discord.conf * Delete conf/key.pem * Delete conf/cert.pem * Delete conf/pixiv.conf * 更新Pixiv服务器上游IP * Delete conf directory then reload * rename and rebuild the conf * 更新日志 * 自签证书★使用说明★ * Delete 备用文件 directory * Update nginx.conf * Update and rename Hosts to host * Delete hosts * Update and rename host to hosts
2024-12-04 21:33:21 +08:00
#use icop;
#multi_accept on;
worker_connections 32767;
2018-09-17 18:29:24 +08:00
}
http {
2024.09.14 (#73) * Add files via upload Update the upstream of Steam, Pixiv, E-hentai Add Server : Discord (IPv4) Instagram (IPv6 Only, Local DNS rewrite required to rewrite all subdomains) WallHaven (IPv4, image CDN Only, excluding pages) Reddit (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitter (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitch (IPv4, Local DNS And DoH were required to rewrite all subdomains) GoogleCDN (File Server IPv6 Only, website pages and IPv4 servers were not included, Local DNS rewrite required to rewrite all subdomains) * Update the self-signed certificate config self-signed certificate * Update README.md * 更换NGINX版本 * 配置文件(2024年08月31日18时11分 配置文件(2024年08月31日18时11分 1、更新部分上游服务器 2、改进KeepAlive参数,提升访问可靠性 * 改进部分上游服务器写法,避免了可能导致"not signaled for 5s"停止的问题 * 改进部分上游服务器写法 * Update the domains * 增加FaceBook反向代理 配置文件(2024年09月14日14时00分 1、修复部分上游服务器 2、新增FaceBook反向代理(仅IPv6,需要本地dns进行批量dns重写 * 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 * 更新子证书内容,以支持FaceBook 更新子证书内容,以支持FaceBook * Delete facebook * Delete conf/Reddit.conf * Delete conf/Twitch.conf * Delete conf/Twitter.conf * Delete conf/instagram.conf * Delete conf/Twitter.params * Delete conf/Twitch.params * Delete conf/Discord.conf
2024-09-14 18:46:59 +08:00
resolver 119.29.29.29 valid=300s;
resolver_timeout 10s;
#include mime.types;
#default_type application/octet-stream;
ssl_protocols TLSv1.2 TLSv1.3 TLSv1 TLSv1.1 SSLv2 SSLv3;
#ssl_ciphers "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256";
log_format main '$time_local 客户端地址:"$remote_addr" 请求耗时"$request_time" 域名:$http_host 监听地址:$server_addr 监听端口:$server_port $server_protocol\n 上游状态"$upstream_status" 上游地址:"$upstream_addr" $status 总字节数$body_bytes_sent\n "$http_referer" "$http_x_forwarded_for" \n    "$request"\n';# "$http_user_agent"
access_log logs/access.log main buffer=4k;
2024年12月4日更新 (#80) * Add files via upload Update the upstream of Steam, Pixiv, E-hentai Add Server : Discord (IPv4) Instagram (IPv6 Only, Local DNS rewrite required to rewrite all subdomains) WallHaven (IPv4, image CDN Only, excluding pages) Reddit (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitter (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitch (IPv4, Local DNS And DoH were required to rewrite all subdomains) GoogleCDN (File Server IPv6 Only, website pages and IPv4 servers were not included, Local DNS rewrite required to rewrite all subdomains) * Update the self-signed certificate config self-signed certificate * Update README.md * 更换NGINX版本 * 配置文件(2024年08月31日18时11分 配置文件(2024年08月31日18时11分 1、更新部分上游服务器 2、改进KeepAlive参数,提升访问可靠性 * 改进部分上游服务器写法,避免了可能导致"not signaled for 5s"停止的问题 * 改进部分上游服务器写法 * Update the domains * 增加FaceBook反向代理 配置文件(2024年09月14日14时00分 1、修复部分上游服务器 2、新增FaceBook反向代理(仅IPv6,需要本地dns进行批量dns重写 * 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 * 更新子证书内容,以支持FaceBook 更新子证书内容,以支持FaceBook * Delete facebook * Delete conf/Reddit.conf * Delete conf/Twitch.conf * Delete conf/Twitter.conf * Delete conf/instagram.conf * Delete conf/Twitter.params * Delete conf/Twitch.params * Delete conf/Discord.conf * 更新steam上游 * 2024年10月17日更新 更新Steamd的FastlyCDN和imgur * Delete conf/DLsite.conf * Delete conf/SteamCDN.params * Delete conf/Discord.conf * Delete conf/key.pem * Delete conf/cert.pem * Delete conf/pixiv.conf * 更新Pixiv服务器上游IP * Delete conf directory then reload * rename and rebuild the conf * 更新日志 * 自签证书★使用说明★ * Delete 备用文件 directory * Update nginx.conf * Update and rename Hosts to host * Delete hosts * Update and rename host to hosts
2024-12-04 21:33:21 +08:00
open_log_file_cache max=100 inactive=1m valid=1m min_uses=1;
fastcgi_buffers 16 128k;
2018-09-17 18:29:24 +08:00
2021-01-24 17:44:59 +08:00
sendfile on;
2018-09-17 18:29:24 +08:00
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 120;
2024年12月4日更新 (#80) * Add files via upload Update the upstream of Steam, Pixiv, E-hentai Add Server : Discord (IPv4) Instagram (IPv6 Only, Local DNS rewrite required to rewrite all subdomains) WallHaven (IPv4, image CDN Only, excluding pages) Reddit (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitter (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitch (IPv4, Local DNS And DoH were required to rewrite all subdomains) GoogleCDN (File Server IPv6 Only, website pages and IPv4 servers were not included, Local DNS rewrite required to rewrite all subdomains) * Update the self-signed certificate config self-signed certificate * Update README.md * 更换NGINX版本 * 配置文件(2024年08月31日18时11分 配置文件(2024年08月31日18时11分 1、更新部分上游服务器 2、改进KeepAlive参数,提升访问可靠性 * 改进部分上游服务器写法,避免了可能导致"not signaled for 5s"停止的问题 * 改进部分上游服务器写法 * Update the domains * 增加FaceBook反向代理 配置文件(2024年09月14日14时00分 1、修复部分上游服务器 2、新增FaceBook反向代理(仅IPv6,需要本地dns进行批量dns重写 * 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 * 更新子证书内容,以支持FaceBook 更新子证书内容,以支持FaceBook * Delete facebook * Delete conf/Reddit.conf * Delete conf/Twitch.conf * Delete conf/Twitter.conf * Delete conf/instagram.conf * Delete conf/Twitter.params * Delete conf/Twitch.params * Delete conf/Discord.conf * 更新steam上游 * 2024年10月17日更新 更新Steamd的FastlyCDN和imgur * Delete conf/DLsite.conf * Delete conf/SteamCDN.params * Delete conf/Discord.conf * Delete conf/key.pem * Delete conf/cert.pem * Delete conf/pixiv.conf * 更新Pixiv服务器上游IP * Delete conf directory then reload * rename and rebuild the conf * 更新日志 * 自签证书★使用说明★ * Delete 备用文件 directory * Update nginx.conf * Update and rename Hosts to host * Delete hosts * Update and rename host to hosts
2024-12-04 21:33:21 +08:00
keepalive_requests 10000;
client_max_body_size 200m;
2018-09-17 18:29:24 +08:00
server_names_hash_max_size 512;
server_names_hash_bucket_size 1024;
gzip on;
2024年12月4日更新 (#80) * Add files via upload Update the upstream of Steam, Pixiv, E-hentai Add Server : Discord (IPv4) Instagram (IPv6 Only, Local DNS rewrite required to rewrite all subdomains) WallHaven (IPv4, image CDN Only, excluding pages) Reddit (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitter (IPv4, Local DNS rewrite required to rewrite all subdomains) Twitch (IPv4, Local DNS And DoH were required to rewrite all subdomains) GoogleCDN (File Server IPv6 Only, website pages and IPv4 servers were not included, Local DNS rewrite required to rewrite all subdomains) * Update the self-signed certificate config self-signed certificate * Update README.md * 更换NGINX版本 * 配置文件(2024年08月31日18时11分 配置文件(2024年08月31日18时11分 1、更新部分上游服务器 2、改进KeepAlive参数,提升访问可靠性 * 改进部分上游服务器写法,避免了可能导致"not signaled for 5s"停止的问题 * 改进部分上游服务器写法 * Update the domains * 增加FaceBook反向代理 配置文件(2024年09月14日14时00分 1、修复部分上游服务器 2、新增FaceBook反向代理(仅IPv6,需要本地dns进行批量dns重写 * 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 删除非windows使用的文件夹,现在conf文件夹多端通用,nginx版本大于18即可 * 更新子证书内容,以支持FaceBook 更新子证书内容,以支持FaceBook * Delete facebook * Delete conf/Reddit.conf * Delete conf/Twitch.conf * Delete conf/Twitter.conf * Delete conf/instagram.conf * Delete conf/Twitter.params * Delete conf/Twitch.params * Delete conf/Discord.conf * 更新steam上游 * 2024年10月17日更新 更新Steamd的FastlyCDN和imgur * Delete conf/DLsite.conf * Delete conf/SteamCDN.params * Delete conf/Discord.conf * Delete conf/key.pem * Delete conf/cert.pem * Delete conf/pixiv.conf * 更新Pixiv服务器上游IP * Delete conf directory then reload * rename and rebuild the conf * 更新日志 * 自签证书★使用说明★ * Delete 备用文件 directory * Update nginx.conf * Update and rename Hosts to host * Delete hosts * Update and rename host to hosts
2024-12-04 21:33:21 +08:00
include site-pixiv.conf;
include site-ehentai.conf;
#include site-steam.conf;
#include site-dlsite.conf;
#include site-instagram.conf;
#include site-facebook.conf;
#include site-iwara.conf;#目前已不需要反代
#include site-reddit.conf;
#include site-discord.conf;
#include site-twitter.conf;
#include site-twitch.conf;
#include site-wall-haven.conf;
#include site-imgur.conf;
#include site-imgix.conf;
#include site-google-video.conf;
}