到目前为止,尝试,但不能从他们的端点得到有效的响应(SSL握手失败) server { listen 443 ssl; server_name xxx; ssl on; ssl_certificate /etc/letsencrypt/live/xxx/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/xxx/privkey.pem; ssl_session_timeout 24h; ssl_session_cache shared:SSL:10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers 'xxx'; ssl_prefer_server_ciphers on; ssl_stapling on; ssl_stapling_verify on; resolver 127.0.0.1; add_header Strict-Transport-Security max-age=31536000; ssl_dhparam /xxx/dhparam.pem; location / { proxy_pass https://us-central1-project_id.cloudfunctions.net; } } 获取以下内容: … peer closed connection in SSL handshake while SSL handshaking […]
我有以下configuration,现在将/create_user/check重写为/create_user.php?check=true 。 location / { try_files $uri $uri/ @ext-php; } location @ext-php { rewrite ^(.*)/create_user/check$ $1/create_user.php?check=true last; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.0-fpm.sock; } 另外,我想将使用“create_user.php?check = true”版本的用户redirect到无扩展版本。 什么是最好的方式来configuration? 是在服务器块(如下)重写一个好办法做到这一点? rewrite ^(.*)/create_user.php?check=true$ $1/create_user/check redirect; 更新:以下configuration更改工作:添加一个地图块: map $query_string $updated_path { "check=true" "check"; } 并将服务器块中的重写更改为: rewrite ^(.*/create_user).php$ $1/$updated_path? redirect;
我正在从ownCloud转换到Nextcloud。 一切似乎工作,只有上传不起作用,但。 每次我通过Web Interface上传,我都会收到“Bad Request”消息。 通过桌面客户端,我还收到了一些额外的信息“坏请求”。 server replied: Bad Request (expected filesize 86622 got 8192) 我为每个上传的文件都得到了这个,除了当然第一个文件大小是不同的,“got”部分总是8192.这看起来似乎有某种8192字节的限制,但是我找不到它。 我最初是在Apache的Docker容器中运行ownCloud,由NGinx通过proxy_pass 。 现在我安装了php5-fpm ,并将其设置为在我的用户帐户下运行(以便Nextcloud将创build具有正确所有权的文件)。 /home/niklas/ nextcloud/ data/ (Nextcloud data directory) nextcloud/ (Nextcloud source code) php-fpm/ (php5-fpm configuration and runtime files) conf www.conf pid sock 我已经从/etc/php5/fpm/php-fpm.conf和pool.d/www.conf分别复制了php5-fpmconfiguration并更新了它们。 您可以在下面findconfiguration。 NGinx的configuration也大多是从这里复制的。 这个错误从哪里来? 不幸的是我不能粘贴这个configuration,因为这个问题的内容太长了。 /家庭/尼古拉斯/ nextcloud / PHP-FPM / conf目录 /home/niklas/nextcloud/php-fpm/www.conf /etc/nginx/sites-enabled/nextcloud.conf 显然这与我运行php5-fpm的方式有关。 当我使用系统configuration的php5-fpm守护程序时,它工作。 […]
我最近在debian 8上创build了一个nginx服务器。它在/ etc / nginx / sites-available / default中提供了一个默认configuration,它被redirect到一个nginx的欢迎页面。 server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.php index.html index.htm index.nginx-debian.html; server_name your_server_ip; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; } location ~ /\.ht { deny all; } } 我已经添加了一个新的生产页面,用'ssl'来说'example.com'。 在../example.com的configuration中,它没有被设置为默认服务器。 server { […]
我正在使用端口81的nginx和端口80的apache运行。我尝试把SSL证书放在nginx中。 这不是在开玩笑。 这是我的nginx的默认值: server{ listen 81; listen 443 ssl; server_name 35.154.225.46; ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /etc/nginx/ssl/nginx.key; location / { proxy_pass http://localhost:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } 我按照以下教程创build了SSL证书 : 如何在Nginx上为Ubuntu 14.04创buildSSL证书 编辑:之前我试图使用SSL。 我在端口81上使用nginx [node js],在端口80上使用apache [php]。现在我试着在nginx中使用SSL。 现在Nginx正在使用ssl默认端口[80],Apache不工作。 我想两个服务器应该运行。
首先,如果我的英文不是很好,如果有什么词不能正确理解,我表示歉意。 我正尝试为两个项目提供服务,我在同一台机器上安装了不同的地点。 我想调用这两个项目使用一个单一的IP和端口,但不同的目录: Test.example.com/advanceerp Test.example.com/phpmyadmin 设置应该很容易。 我得到nginx显示我的project1没有问题,但是当试图服务project2表明404错误。 如果我检查日志,我发现当它试图服务这个项目时,它正在查看名为advance的项目的根目录…我已经在我的站点上启用了两个虚拟主机,如下所示: server { listen 80; listen [::]:80; root /var/www/; # Add index.php to the list if you are using PHP index index.php index.html index.htm index.nginx-debian.html; server_name test.example.com; location /advanceerp { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.1-fpm.sock; } location ~ /\.ht { […]
我有点困惑,并不明白为什么我得到404 Not found请求http:/customer.local/sign-out奇怪的是,这是只发生在Firefox浏览器与CURL或Chrome工作正常。 在这里我的nginxconfiguration。 预期的302端点/sign-out响应。 但是Firefox的回应是404。 upstream cd_tomcat { server 127.0.0.1:9180; } upstream ua_tomcat { server 127.0.0.1:9080; } server { listen 80; listen [::]:80; server_name customer.local; proxy_hide_header X-Frame-Options; proxy_hide_header X-XSS-Protection; proxy_hide_header Strict-Transport-Security; proxy_hide_header X-Content-Type-Options; proxy_hide_header X-Nexmo-Disable2FA; proxy_hide_header X-Nexmo-Trace-Id; add_header X-Frame-Options sameorigin always; add_header X-XSS-Protection "1; mode=block;" always; add_header Strict-Transport-Security "max-age=31536000; includeSubdomains" always; add_header X-Content-Type-Options nosniff […]
我有一个nginx实例,在HTTPS上提供一切正常,但不在HTTP上。 当我去http://myserver.com/something然后它只是手中,但是,如果我去https://myserver.com/something然后它服务的页面。 这是我的path寻找sites-available root@myserver:~# ls -al /etc/nginx/sites-available/ total 28 drwxr-xr-x 3 root root 4096 May 11 15:37 . drwxr-xr-x 7 root root 4096 Feb 11 22:46 .. -rw-r–r– 1 root root 586 Oct 6 2015 default -rw-r–r– 1 root root 1901 Oct 6 2015 default.orig drwxr-xr-x 2 root root 4096 May 11 15:30 locations -rw-r–r– […]
环境: 在256MB VPS上全新安装Ubuntu 16.04 与PHP 7.1的LEMP堆栈 只有Avada主题和相关插件的最新WordPress安装。 没有上传时至less有75MB的RAM空间 错误: 上传大图时获取502错误〜8MB和24MP。 服务器收到文件好,但处理缩略图时返回错误。 我使用这个服务器来探索可能的自我托pipe的图像解决scheme,所以我也临时安装了Lychee,并且在上传图像时也发生同样的情况。 Nginx日志: recv() failed (104: Connection reset by peer) while reading response header from upstream, PHP7.1-FPM日志: [pool www] child 451 exited on signal 9 (SIGKILL) Nginxconfiguration: https : //pastebin.com/MtWdeeGz Nginx站点configuration: https : //pastebin.com/YqWg9Euy PHP.ini – pastebin.com/cJpgchQj 我已经尝试过但没有用的东西: 使用套接字而不是TCP 在nginx.conf和站点configuration中都实现了fast_cgi参数 增加了wpconfig.php中的WordPress内存限制 在PHP.ini中增加了PHP内存限制 增加执行时间 感谢您提供的任何帮助和见解!
用Nginx作为反向代理,你如何在cookie中添加samesite = strict或samesite = lax?