我的日志logging设置是一个单一的Docker主机,UDP 514暴露给syslog。 一个nginx容器的端口已经发布,所以当你发送日志到10.1.1.100(在下面的图片中),它首先命中nginx,其configuration为透明负载平衡Logstash容器是: user root; events {worker_connections 32768;} stream { upstream logstash_servers { server logstash-collector-01:514; server logstash-collector-02:514; server logstash-collector-03:514; } listen 514 udp; proxy_pass logstash_servers; proxy_bind $remote_addr transparent; } } 这工作正常。 但是,TCP 514(或任何TCP,就此而言)不是。 即使当我添加了正确的监听器和configuration,我相信TCP握手并没有完成,因为在nginx做透明的负载平衡,它的proxy_bind传递,例如10.1.1.5作为源IP到例如172.18.0.4(一个Logstash实例)。 然后,该实例尝试完成握手,但10.1.1.5(以及任何路由器)不知道如何路由到172.18.0.0/16的Dockernetworking。 有没有一种解决scheme可以使用TCP进行日志logging?
ssl_stapling_verify指令到底是什么? 是否检查答案的签名是否正确? 官方的nginx文档在解释这个时非常模糊: https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_stapling_verify 启用或禁用服务器validationOCSP响应。 要使validation生效,应使用ssl_trusted_certificate指令将服务器证书颁发者,根证书和所有中间证书的证书configuration为可信。
我的服务器运行在LEMP堆栈Ubuntu 16.04和最后一个版本的nginx上 我已经在我的服务器上为以下域和子域安装了SSL证书: example.com , domain1.example.com和一切工作正常。 我试图实现的 我想为domain2.example.com创build一个新的证书 为此,我尝试了这个命令: sudo certbot –nginx -d example.com -d domain1.example.com -d domain2.example.com –expand 错误信息 在/etc/nginx/sites-enabled/example.com中找不到set(['www.example.com','* .example.com','example.com'))的证书或密钥指令。 VirtualHost没有被修改。 nginxconfiguration server { # SSL configuration listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; include snippets/ssl-example.com.conf; include snippets/ssl-params.conf; root /var/www/laravel/public; index index.php index.html index.htm; server_name example.com *.example.com www.example.com ; } […]
我的nginx.conf几乎是添加了后备服务器块的默认conf: user www-data; worker_processes auto; pid /run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # SSL Settings ## ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # […]
我在我的NGINX服务器上有HTTP2协议的问题,这是我的configuration listen 443 ssl http2; server_name adomain.com; root /var/www/project; limit_req zone=one burst=60 nodelay; add_header Strict-Transport-Security "max-age=2592000; includeSubdomains;" always; ssl_certificate /etc/letsencrypt/live/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; ssl_dhparam /etc/nginx/ssl/dhparam.pem; resolver 8.8.8.8; ssl_stapling on; ssl_stapling_verify on; keepalive_timeout 70; 我看不到我的iOS设备上的错误(safari 11),很奇怪,网页是一个SPA(angular度),应用程序向API发出请求,应用程序通过HTTP2加载,但是当应用程序必须向API失败,从listen禁用HTTP2会使所有事情都按照预期工作 两个服务器前端/后端的密码是相同的 在Chrome / Firefox / IE工作正常,我不知道Safari或我的服务器configuration有什么问题 当Safari失败时,error.log和adomain-error.log是空的 Nginx版本 nginx […]
我有一个安装在服务器上的mercurial web-frontend(hgwebdir.cgi),并且安装了nginx作为web前端的反向代理被安装在我的朋友的build议之下。 但是,每当大的变更集被推送(通过脚本),它就会失败。 我发现了一个问题ticket @ google-code描述类似的问题,并且有一个解决scheme(#39) 所以服务器端的答案是:不要提早发回401。 像“hg serve”一样慢/哑,并使hg客户端发送捆绑包两次。 我怎么做? 我目前的nginxconfiguration location /repo/testdomain.com { rewrite ^(.*) http://bpj.kkr.gov.my$1/hgwebdir.cgi; } location /repo/testdomain.com/ { rewrite ^(.*) http://bpj.kkr.gov.my$1hgwebdir.cgi; } location /repo/testdomain.com/hgwebdir.cgi { proxy_pass http://localhost:81/repo/testdomain.com/hgwebdir.cgi; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_buffering on; client_max_body_size 4096M; proxy_read_timeout 30000; proxy_send_timeout 30000; } 从访问日志中我们可以看到408个条目 incoming.ip.address – – [18/Nov/2009:08:29:31 +0800] "POST /repo/testdomain.com/hgwebdir.cgi/example_repository?cmd=unbundle&heads=73121b2b6159afc47cc3a028060902883d5b1e74 HTTP/1.1" 408 […]
我试图部署一个网站只有https访问,没有http访问。 我确信我只是在configuration文件中丢失了一些简单的行。 正如标题所说,这是在nginx 0.7.65到乘客2.2.9上的Sinatra 0.9.4。 Sinatra服务的主要ruby文件有: require 'ssl_requirement' def ssl_required? true end config.ru有(虽然我不知道它是相关的): require 'rubygems' require 'sinatra' require 'app.rb' set :environment, :production run Sinatra::Application nginx.conf文件如下所示: worker_processes 1; events { worker_connections 1024; } http { passenger_root /var/lib/gems/1.8/gems/passenger-2.2.9; passenger_ruby /usr/bin/ruby1.8; include mime.types; default_type application/octet-stream; # HTTPS server # server { listen 80; listen 443; server_name an.internal.ip.address; root […]
由于Nginx要求geoip_指令进入nginx.conf文件的主要http块,这是否意味着正在为每个请求拉取geoip数据? 换句话说,Nginx是否查找所有请求的地理数据,即使是那些不需要数据的用户?
我试图运行一个Django的网站与Apache的mod-wsgi与nginx作为前端反向代理到Apache。 在我的Apache ports.conf文件中: NameVirtualHost 192.168.0.1:7000 Listen 192.168.0.1:7000 <VirtualHost 192.168.0.1:7000> DocumentRoot /var/apps/example/ ServerName example.com WSGIDaemonProcess example WSGIProcessGroup example Alias /m/ /var/apps/example/forum/skins/ Alias /upfiles/ /var/apps/example/forum/upfiles/ <Directory /var/apps/example/forum/skins> Order deny,allow Allow from all </Directory> WSGIScriptAlias / /var/apps/example/django.wsgi </VirtualHost> 在我的nginxconfiguration中: server { listen 80; server_name example.com; location / { include /usr/local/nginx/conf/proxy.conf; proxy_pass http://192.168.0.1:7000; proxy_redirect default; root /var/apps/example/forum/skins/; } #error_page […]
我已经将Source X和PHP 5.3.3从源代码安装到CentOS 5.5服务器上。 我认为从安装一切进展顺利,引擎X确实提供静态文件。 当试图访问一个基本的PHP文件,但它作为纯文本服务的PHP代码。 引擎X错误日志显示: 2010/09/23 20:49:35 [error] 3331#0:* 6 connect()失败(111:Connection refused)while 连接到上游,客户端:my.local.ip,服务器:the_server, 请求:“GET / HTTP / 1.1”,上行:“fastcgi://127.0.0.1:9000”, 主持人:“the.servers.ip” 我的configuration文件如下: 服务器{ 听*:80; 位置〜\ .php $ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME / var / www / default $ fastcgi_script_name; fastcgi_param PATH_INFO $ fastcgi_script_name; include / usr / local / nginx / conf / fastcgi_params; […]