nginx实现Ipv6地址解析
Posted 叨客厨子
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx实现Ipv6地址解析相关的知识,希望对你有一定的参考价值。
nginx实现Ipv6地址解析
1.nginx实现Ipv6地址解析
[[email protected] conf]# cat nginx.conf
worker_processes 2;
events {
worker_connections 1024;
}
stream {
upstream wawatcp {
# wawa tcp
server 54.223.130.148:8090;
}
server {
listen 8090;
listen [::]:8090 ipv6only=on;
proxy_pass wawatcp;
}
}
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 /usr/local/nginx/logs/acclog.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_header_buffer_size 1024k;
large_client_header_buffers 4 1024k;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 32k;
gzip_http_version 1.1;
gzip_comp_level 9;
gzip_types text/css text/xml application/javascript;
gzip_vary on;
include mime.types;
default_type application/octet-stream;
upstream wawabot {
# wawa bot
server 54.222.153.114:8082;
server 54.223.130.148:8082;
}
server {
listen 443 ssl;
listen [::]:443 ipv6only=on;
ssl on;
ssl_certificate /usr/local/nginx/ssl/STAR_game508_com.crt;
ssl_certificate_key /usr/local/nginx/ssl/game508com.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
#ssl_ciphers HIGH:!aNULL:!MD5;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
index index.html index.htm;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://wawabot;
}
}
}
以上是关于nginx实现Ipv6地址解析的主要内容,如果未能解决你的问题,请参考以下文章