当我通过别名加载一个静态文件时,它会将整个文件加载到RAM中,然后将其发送给用户,还是直接stream到用户? 我徘徊,因为我有一个250MB的RAM的服务器,我徘徊如果我在NGiNX中使用别名来获得一个250MB或更多的静态文件会发生什么。
Joomla 2.5,PHP 5.3.3(fpm-fcgi),nginx 1.4.2 Nginx正在运行,我可以访问我的网站的主页和其他网站的URL结束index.php就好了。 但是,当我浏览到一个Joomla类别的URL的forms是: http : //www.mysite.com/index.php/features/modules我总是得到一个404。 文章似乎也很好(formshttp://www.mysite.com/index.php?Itemid=404 )它似乎是“index.php”不涉及的类别。 任何人都可以build议我需要添加到我的nginx conf来解决这个问题吗? 谢谢, 史蒂夫
我有一个WordPress的网站与PHP APCcaching启用,我想encryption所有请求http://www.domain.com/wp-login.php*和http://www.domain.com/dashboard?action=profile 。 我想强制一个未encryption的连接一切。 我可以得到这个工作,但configuration是非常丑陋的黑客一起。 我的问题是我仍然必须通过我想要encryption到PHP引擎的两个string。 有一个更好的方法来做到这一点,而不是重复这么多。 server { listen 443; ssl on; ssl_certificate /etc/nginx/ssl/new/server.crt; ssl_certificate_key /etc/nginx/ssl/new/server.key; server_name www.domain.com domain.com; root /var/www; index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php?$args; } location ~ \wp-login.php.* { ##Stuff to send requests to the PHP engine here } location ~ \dashboard?action=profile.* { ##Stuff to send […]
我试图用nginx创build一个重写规则,它用一个参数重写一个不存在的图像uri给dynamic页面,但是失败。 /images/395.4b2a-c6b.large-red/car-image.jpg 至 /thumb.php?param1=4b2a6aa¶m2=c6bc&id=395&size=large&color=red 请求中的参数详细信息是: 395 . 4b2a – c6b . large – red /blabla-image.jpg id . 4 char hash – 3 char hash . size – color 颜色受限于:red | 蓝色| 绿色 尺寸也是有限的:小| 大 我的非工作重写规则是: location ~* \.(jpg)$ { rewrite ^/images/([0-9-]+)\.[a-zA-Z0-9]{4}+\-[a-zA-Z0-9]{3}+\.(.*)\-(.*)/(.*)$ /thumb.php?id=$1¶m1=$2¶m3=$3&size=$4&color=$5 last; } 这条规则有什么问题? 有任何想法吗?
我想写一个Apache的上游variables,在Nginx中是这样的 upstream ghs { ip_hash; server ghs.google.com; server 74.125.43.121; server 74.125.47.121; server 74.125.53.121; } 这可以在病房之后作为一个variables,可以给其他指令,例如 proxy_pass http://ghs/; 什么是这相当于Apache?
出于某种原因,ELB没有正确地将请求转发到EC2上的实例。 我的设置只是一个带有nginx / node的micro实例,在端口80和443上侦听。 实例通过ELB完美地获取健康检查器请求。 “–10 / 08/2013:15:26:18 +0000]”GET / HTTP / 1.1“302 40” – “”ELB-HealthChecker / 1.0“ “–10 / 08/2013:15:26:48 +0000]”GET / HTTP / 1.1“302 40” – “”ELB-HealthChecker / 1.0“ “–10 / 08/2013:15:27:18 +0000]”GET / HTTP / 1.1“302 40” – “”ELB-HealthChecker / 1.0“ “–10 / 08/2013:15:27:48 +0000]”GET / HTTP / 1.1“302 40” – “”ELB-HealthChecker […]
我正在尝试为处理HTTPSredirect本身的应用程序设置一个反向代理(即,如果它注意到该协议不是HTTPS,它将把用户redirect到安全站点): server { listen 80 default_server; listen 443 ssl; location / { proxy_pass http://localhost:8080; proxy_redirect default; proxy_redirect https://$proxy_host/ https://$host/; proxy_set_header X-Forwarded-Proto $scheme; } } 上游服务器需要通过X-Forwarded-Proto头来知道原始请求是否通过了https,它应该知道,假设$scheme在80上是“http”,在443上是“https”。 然而,对于443 和 80端口的请求,似乎总是将$scheme设置为“https”,将$https设置为“on” – 即使这些variables总是说连接是安全的,即使它不是这样? 这些variables是基于服务器configuration“硬编码”的,而不是实际的传入请求?
我在github.com/ioerror/duraconf中发现了一些强化的SSL设置。 这是来自config的头文件: 这是一个高度安全的,兼容SSLv3和TLSv1的HTTPS代理服务器的例子。 服务器只允许提供完美的前向保密的模式; 没有其他模式提供。 匿名密码模式被禁用。 此configuration不包括HSTS标头,以确保用户第一次访问后不会意外连接到不安全的HTTP服务。 它只支持PFS模式下的强密码: ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; # Only strong ciphers in PFS mode ssl_ciphers ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA; ssl_protocols SSLv3 TLSv1; 如果我们在我们的网站上使用这些设置,那么“有点兼容”是什么意思? 比如说IE6还能连接吗?
我的情况是: 在我们的中国公司,我们必须通过互联网访问美国总部的一个networking服务器。 但是networking太慢了,我们下载了很多大的图片文件。 我们所有的开发者都必须等待。 所以我们要设置一个作为反向代理的Nginx,它的上游是我们的美国networking服务器。 问题是我们可以让Nginx将来自美国web服务器的图像文件保存到本地磁盘吗? 我的意思是让Nginx作为一个caching服务器。
谁能帮我? 我从来没有遇到过这个问题。 server { listen 80; server_name litl.it www.litl.it; index index.html index.php index.htm; access_log /var/www/litl.it/logs/access_logs.log; error_log /var/www/litl.it/logs/error_logs.log; root /var/www/litl.it/public/; error_page 401 401.html; error_page 403 403.html; error_page 404 404.html; error_page 500 502 503 504 500.html; location / { try_files $uri $uri/ /index.php?$args; } # rewrite adminpanel to use https rewrite ^/adminpanel(.*)$ https://$host$uri permanent; # Add trailing […]