我使用Nginx创build了一个Radicale实例,进行基本身份validation,但每次login时都说我没有权限。 任何人都可以帮我find问题吗? 根本configuration # -*- mode: conf -*- # vim:ft=cfg # Config file for Radicale – A simple calendar server # # Place it into /etc/radicale/config (global) # or ~/.config/radicale/config (user) # # The current values are the default ones [server] # CalDAV server hostnames separated by a comma # IPv4 syntax: address:port # IPv6 […]
我的Windows 7机器上安装了nginx 1.11.10。 每当我访问my_domain.tld和xyz.my_domain.tld时,它总是返回目录索引“d:/ path / webroot /”被禁止 。 奇怪的是,在my_domain.tld / any_path和xyz.my_domain.tld / any_path下的index.php按预期工作。 在webroots上访问index.php的唯一方法是在地址栏中input/index.php。 我没有与index.html的问题。 这是我的configuration(错误页面的位置和自定义日志configuration不显示在这里)。 除了server_name和根path(d:/ path / webroot-xyz /)之外,xyz.my_domain.tld的块是相似的。 #HTTPS my_domain.tld server { listen 443 ssl; listen [::]:443 ssl; server_name my_domain.tld; charset utf-8; location / { root d:/path/webroot/; index index.php index.html; limit_req zone=one burst=5 nodelay; } #PHP FastCGI location ~ \.php$ { […]
我使用mp4模块从源代码编译的nginx/1.11.11 ,我正在提供从300MB大小到8GB的video文件。 我正在考虑实施类似于谷歌驱动器的油门系统。 如果文件的大小设置的很大, limit_rate ,如果文件的大小很小,则设置一个较小的limit_rate 。 问题是我找不到获取服务文件大小的方法。 我的default.conf文件如下所示: server { listen 80; server_name _; # change this for your server root /var/www; index index.php; client_max_body_size 5G; proxy_read_timeout 60000000; # handle requests to the API location ~ /api/v2/(.+)$ { if (!-e $request_filename) { rewrite ^/api/v2/(.*) /api/v2/index.php?_page_url=$1 last; } fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on; […]
我有一个有几个Docker容器的Web服务器,其中一个是nginx 。 为了便于重新部署,服务器由脚本构build。 现在我想使用letsencrypt证书。 但: letsencrypt需要一个正在运行的HTTP Web服务器进行validation 启用了HTTPS的nginx需要启动证书。 该脚本无法首先启动nginx,因为证书将会丢失。 但是脚本也不能首先获取证书,因为这需要运行一个Web服务器。 经典鸡与鸡蛋的问题。 一个解决办法是 首先创build一个只有HTTPconfiguration的nginx, 运行certbot获取证书, 修改nginxconfiguration并以HTTPS模式重新启动Web服务器。 这似乎不是一个优雅的解决scheme,所以我想知道是否有人提出了一个更好的。
我正在野蛮应用服务器前运行一个nginx代理服务器。 两者都通过https通信。 Nginxconfiguration为validation上游证书的签名: listen 443 ssl http2; server_name _; ssl_certificate_key /etc/nginx/ssl/private/ssl.key.pem; ssl_password_file /etc/nginx/ssl/private/ssl.key.passphrase.txt; proxy_ssl_verify on; proxy_ssl_trusted_certificate /tmp/chain.crt; proxy_ssl_verify_depth 10; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; proxy_buffering off; error_log /proc/self/fd/2; access_log /proc/self/fd/1; # some routes omitted location /orbis-4u/ { proxy_pass https://trrswv056.agfahealthcare.com:8843/orbis-4u/; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Port 443; […]
我在我的access.log中find了这些请求: XXXX – – [03/Apr/2017:20:52:31 +0200] "GET //phpMyAdmin/scripts/setup.php HTTP/1.1" 301 184 "-" "-" XXXX – – [03/Apr/2017:20:52:31 +0200] "GET //myadmin/scripts/setup.php HTTP/1.1" 301 184 "-" "-" XXXX – – [03/Apr/2017:20:52:31 +0200] "GET //phpmyadmin/scripts/setup.php HTTP/1.1" 301 184 "-" "-" XXXX – – [03/Apr/2017:20:52:31 +0200] "GET //MyAdmin/scripts/setup.php HTTP/1.1" 301 184 "-" "-" XXXX – – [03/Apr/2017:20:52:31 +0200] "GET […]
我有以下NGINXconfiguration server { listen 80; server_name www.cakein.local; rewrite_log on; # removes trailing slashes (prevents SEO duplicate content issues) #if (!-d $request_filename) { # rewrite ^/(.+)/$ /$1 permanent; #} location /en { alias /home/sites/cakein/en/webroot; index index.php try_files $uri /index.php?$args; location ~ ^/en(.*)\.php { index index.php; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_index index.php; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$1.php; […]
我一直在我的php-fpm日志中收到以下错误。 我已阅读并尝试了一些类似的问题在serverfault.com上可用但问题没有解决。 [11-Apr-2017 08:33:27] ERROR: unable to read what child say: Bad file descriptor (9) [11-Apr-2017 09:49:26] ERROR: unable to read what child say: Bad file descriptor (9) [11-Apr-2017 09:49:26] ERROR: unable to read what child say: Bad file descriptor (9) [11-Apr-2017 09:56:11] ERROR: unable to read what child say: Bad file descriptor (9) [11-Apr-2017 […]
编辑:如果您有关于如何改进问题或缺less哪些细节的想法,请留下评论。 预期结果: 我试图将nginx作为反向代理来部署,让我公开由Apache提供的文件,而不必提供Apache所需的基本authentication凭证。 我的计划是在从代理发送到Apache的头文件中“静态地”提供基本的authentication凭证,以便用户可以在没有(或看到/知道)凭证的情况下访问这些文件。 build立: Apache需要通过https进行基本身份validation。 要部署的反向代理服务器本身是由一个处理到(docker)主机的传入stream量的nginx代理的。 (docker)主机入口nginx只在443上监听,(docker)主机上/内的stream量是http。 所以设置是: https >> [dockerhost ingress nginx] >> http >> [nginx reverse proxy] >> https >> [apache file server (basic auth)] 我正在使用最新的nginx docker镜像,只是添加了conf。 对于dockerhost入口代理,我使用https://github.com/jwilder/nginx-proxy 。 Apache正在从Hetzner存储箱提供文件。 我看不到或改变它的configuration,Hetzner说他们不能帮助我,因为他们没有正式支持这种设置。 他们最后的答复是: 我们的Apache不需要任何特定的头文件。 所有必要的是通过正确的主机名(由于SNI)和通过端口443处的SLL / HTTPS获得正确的凭证的请求。 问题: 直接地,没有nginx代理,我可以在浏览器中通过基本的身份validation提示或通过curl访问Apache上的文件。 当我尝试通过代理访问这些文件,并试图在nginxconfiguration中将“静态”的信息传递给头部时,我只能从404获得404s。 但是,我可以(而且这使我)通过代理访问文件时,代理没有“静态”基本身份validation,只是提示我的凭据。 所以它似乎是通过基本身份validation,但不能访问任何文件,这使我竹编。 我试过的: 我最初的方法是在这里使用 @Shai提供的位置块进行滚动: 如何使用nginx代理需要身份validation的主机? location / { proxy_set_header Host $host; proxy_set_header […]
我们在http://random-heroku-app.herokuapp.com上有Heroku应用程序,并且使用HTTPS的访问权限必须仅限于2个IP。 Nginx与它的允许function在这里是完美的。 但是,是否有可能在AWS中部署Nginx并对其进行configuration,使其成为Heroku应用的“前台”? 例如:如果我去http://random-heroku-app.herokuapp.com首先会检查我是否尝试从允许的IP连接,然后代理我到http://random-heroku-app.herokuapp.com 。 先谢谢你!