我正在运行CentOS 6 x64,我希望能够针对OpenSSL 1.0.2k编译nginx 1.11.9,所以我可以使用HTTP / 2。 我已经下载了openssl-1.0.2k到/ usr / local / src: [root@qpat1 nginx-1.11.9]# ls /usr/local/src openssl-1.0.2k 我正在尝试使用这些命令来编译nginx: $ ./configure –prefix=/etc/nginx –sbin-path=/usr/sbin/nginx –modules-path=/usr/lib64/nginx/modules –conf-path=/etc/nginx/nginx.conf –error-log-path=/var/log/nginx/error.log –http-log-path=/var/log/nginx/access.log –pid-path=/var/run/nginx.pid –lock-path=/var/run/nginx.lock –http-client-body-temp-path=/var/cache/nginx/client_temp –http-proxy-temp-path=/var/cache/nginx/proxy_temp –http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp –http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp –http-scgi-temp-path=/var/cache/nginx/scgi_temp –user=nginx –group=nginx –with-compat –with-file-aio –with-threads –with-http_addition_module –with-http_auth_request_module –with-http_dav_module –with-http_flv_module –with-http_gunzip_module –with-http_gzip_static_module –with-http_mp4_module –with-http_random_index_module –with-http_realip_module –with-http_secure_link_module –with-http_slice_module –with-http_ssl_module –with-http_stub_status_module –with-http_sub_module –with-http_v2_module –with-mail […]
我有一个djangonetworking应用程序,它运行在服务器IP地址23.xxx.105.49和域名为www.example1.com 以下是我的nginxconfiguration server { listen 80; server_name example1.com www.example1.com ; location / { return 301 https://www.example1.com$request_uri; } } server { listen 443 ssl; server_name example1.com www.example1.com; ssl_certificate /etc/ssl/ford/ford.com.chained.crt; ssl_certificate_key /etc/ssl/ford/www.ford.com.key; ssl_session_timeout 20m; ssl_session_cache shared:SSL:10m; # ~ 40,000 sessions ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # SSLv2 # ssl_ciphers ALL:!aNull:!eNull:!SSLv2:!kEDH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+EXP:@STRENGTH; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; client_max_body_size 20M; location / […]
我想redirectip:端口请求到一个特定的子域名如下: xxx.xxx.xxx.xxx:8080 > app1.nilux.eu xxx.xxx.xxx.xxx:8099 > app2.nilux.eu 编辑:我目前使用这个configuration: ssl_certificate /crt/ssl.crt; ssl_certificate_key /crt/ssl.key; server { listen 80; return 301 https://$host$request_uri; } server { listen 80; server_name xxx.xxx.xxx.xxx; return 301 $scheme://nilux.eu$request_uri; } server { listen 443 ssl; server_name nilux.eu www.nilux.eu; ssl on; return 404; } server { listen 443 ssl; server_name app1.nilux.eu www.app1.nilux.eu; ssl on; location / […]
以前的服务器在Apache上运行,但现在我已经切换到Nginx。 这一切都工作很好,除了我不知道如何将这个Apache线路转换为我的工作nginxconfiguration SetEnvIf Host "^([^\.]+)\.my-shop\.dev$" MY_ENV=$1 它需要做的是,它需要读取拳头“param / subdomain / something”并设置为环境variables 到目前为止,我试图通过做这样的事情来实现这一点,但它不工作 server { listen 80 ; server_name $\.my-shop\.dev; location ~* \.php$ { try_files $uri $uri/ /index.php?q=&$args; fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_param MY_ENV $1; } } 如果您需要任何其他信息,请让我知道,我会提供。 谢谢!
我安装了让我们encryption我的VPS。 在此之前,页面正常工作,但域后显示“欢迎使用nginx”页面。 我只通过为SSL添加声明来编辑默认值 server { listen 80 default_server; listen [::]:80 default_server; # listen 443; root /var/www/html/public; index index.php index.html index.htm; server_name example.com; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.0-fpm.sock; } location ~ /\.ht { deny all; } location ~ /.well-known { allow all; } return 301 […]
首先,我更像是一个开发者而不是pipe理者。 我在这里问了同样的问题。 但请让我知道是否有更好的地方来问这个问题。 这是我的情况。 我有一个应用程序是build立在Linux上运行。 它同时提供https(在使用nginx的端口443上)和ssh(在端口22上)。 但是由于组织的限制,我不得不使用虚拟框在Linux客户端的Windows主机上运行它。 此外,主机上还有另一个Web应用程序。 这两个Web应用程序都应该基于URL来提供服务(例如:app1.com,app2.com)。 url需要保留。 所有sshstream量都可以默认为guest。 我必须做出这个工作的一个想法是,下面我想知道是不是让这个问题变得更复杂。 任何帮助表示赞赏。 脚步: 在主机上使用未使用的端口(例如8443),并将所有stream量redirect到来宾。 在Virtualbox中使用基于NAT的端口转发(8443 – > 443,22 – > 22)。 唯一剩下的就是在主机上设置另一个nginx作为反向代理。 在Windows(/ etc / hosts)上设置虚拟主机,并拥有两个IP和URL条目(app1.com和app2.com)。 在主机上使用一个单独的nginx作为反向代理,将app1stream量redirect到主机上的web应用程序,并将app2stream量redirect到8443。 问题: 我可以避免主机上额外的nginx反向代理,同时保留的URL? 还有什么关于SSL。 我可以在主机上设置https并将其路由到客户端的端口80,并避免拥有两个证书? 注意:我在Virtualbox中使用NAT,所以我不应该有任何安全问题。
我的网站playsongs.pk有499,502和php-fpm.sock failed (11: Resource temporarily unavailable) errors当我收到300-400活跃用户在现场。 示例/示例错误日志: 2017-02-27 14:56:23 Error 162.158.78.50 499 GET / HTTP/1.1 0 nginx access 2017-02-27 14:56:23 Error 162.158.78.20 502 GET / HTTP/1.1 166 nginx access 2017-02-27 14:56:23 Error 162.158.78.170 502 GET / HTTP/1.1 166 nginx access 2017-02-27 14:56:23 Error 162.158.79.63 502 GET / HTTP/1.1 166 nginx access 2017-02-27 14:56:23 Error […]
我试图从HTTP迁移到HTTPS,但是,我的nginx(版本:1.10.3)configuration似乎没有工作。 以下行为是需要的: http://www.example.com/path/to/content应该redirect到https://example.com/path/to/content http://example.com/path/to/content应redirect到https://example.com/path/to/content https://www.example.com/path/to/content应redirect到https://example.com/path/to/content 与我目前的configuration浏览器不会连接到使用HTTPS的网站: server { listen 80; listen [::]:80; server_name www.example.com example.com; # redirects both www and non-www to https rewrite ^(.*) https://www.example.com$1 permanent; } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name example.com; # redirects non-www to www rewrite ^(.*) https://www.example.com$1 permanent; } server { listen 443 ssl […]
我有一个本地支持HTTPS和HTTP / 2的Web服务。 它被nginx反向代理。 在nginx和应用程序上启用SSL和HTTP / 2,仅在nginx上进行权衡是什么?
我正在设置让我们encryption自动发出证书。 每个用户都有自己的子域名,所以我需要每隔几个小时批量创build一个证书,以避免LE的限制。 在他们注册的时间和他们的证书准备好的时候,我想通过HTTP服务他们的子域名。 只要证书存在,操作应始终将HTTPredirect到HTTPS。 奖励,如果我们可以检查证书的有效性。 build议?