Articles of nginx

Django部署Reccomendations

我有一个以SaaS方式提供的Web应用程序…(每个客户都有自己的子域和他自己的数据库)。 我的应用程序使用Django Python和Postgresql。 现在是在一个Linux共享托pipe计划,使用Apache和mod_wsgi托pipe,但我下个月迁移到一个Linux VPS,并已阅读有关Nginx和Gunicorn(也uwsgi)是一个更好的方式去…我想了解您关于部署django的build议。 我主要是开发人员,所以我有一个系统pipe理员的背景。

nginx https代理

我已经使用nginx作为redirect的代理 http://www.mydomain.com ==> http://192.168.0.1 但是当我尝试redirect https://www.mydomain.com ==> https://192.168.0.1 这是行不通的 ! 我的nginx.conf: server { listen 443; server_name www.mydomain.com; location / { proxy_pass https://192.168.0.1; } } 当我去https://192.168.0.1它工作正常! nginx在192.168.0.2(另一台机器)上。 我做错了什么 ?

nginx的logrotateconfiguration

什么是最好的方法来旋转nginx日志文件? 在我看来,我应该在/etc/logrotate.d/中创build一个“nginx”文件,并用下面的代码填充它,然后执行/etc/init.d/syslog restart。 这将是我的configuration(我还没有testing过): /usr/local/nginx/logs/*.log { #rotate the logfile(s) daily daily # adds extension like YYYYMMDD instead of simply adding a number dateext # If log file is missing, go on to next one without issuing an error msg missingok # Save logfiles for the last 49 days rotate 49 # Old versions of log […]

在nginx的子path中configuration一个应用程序

我在Fedora服务器上安装了nginx + passenger +单轨应用程序。 我关于我的应用程序的nginx.conf看起来像这样: server { listen 80; server_name myapp.mycompany.com; root /opt/apps/myapp_large_name/public; passenger_enabled on; client_max_body_size 4M; } 所以当我访问myapp.mycompany.com.br它访问我的rails应用程序/ opt / apps / myapp_large_name / public下。 我想能够configuration一个子path来访问另一个应用程序(在这种情况下,monit)。 我想要这样的东西: myapp.mycompany.com.br/monit访问监控应用程序。 可能吗?

nginx错误:上游超时(110:连接超时)

我有一个nginx服务器与5个后端服务器。 我们服务大约400-500个请求/秒。 我已经开始得到大量的上游超时错误(110:连接超时) error.log中的错误string如下所示 2011/01/10 21:59:46 [error] 1153#0: *1699246778 upstream timed out (110: Connection timed out) while reading response header from upstream, client: {IP}, server: {domain}, request: "GET {URL} HTTP/1.1", upstream: "http://{backend_server}:80/{url}", host: "{domain}", referrer: "{referrer}" 任何build议如何debugging这样的错误。 我无法find一个munin插件来检查上游错误的数量。 有时每天的错误数量太高,有些时候它是一个更体面的3位数字。 一个munin图可能会帮助我们找出任何其他模式或关联 我们怎样才能使这样的错误的数量为零

nginx引用日志

nginx是否具有相当于引用日志的apache? 对于Apache,你可以有类似的东西 Customlogs logs/referer_log referer 基本上我想知道谁是指交通到我的nginx服务器。 谢谢!

我如何得到python在nginx上工作

我刚刚安装了Python 2.7.1,它从命令行工作正常。 我有我的nginxnetworking服务器上运行良好的PHP。 它使用php-fpm。 我如何得到Python的Nginx的工作? 谢谢

Nginx重写模块(Catch-all)

我是Nginx的新手,我怎样才能重写这个mod_rewrite,这样在Nginx中可以工作? RewriteEngine On RewriteRule (.*) index.php 我试过了,但没有奏效。 location / { (…) reqrite (.*) /index.php last; } 谢谢!

使用NGINX作为SSL代理时的IP直通

我有nginxconfiguration为apache web服务器做SSL终止。 这似乎是工作,但是所有的请求到networking服务器似乎来自nginx服务器,而不是原来的IP地址。 这些是否可以完好无损?

替代反向代理,支持HTTP 1.1,SSL,并保持活力?

我们正在使用nginx,但是我们需要使用HTTP 1.1代理上游到haproxy,而nginx的代理模块不支持。 是否有支持HTTP 1.1,SSL和客户端保持活动的可靠的,由事件驱动的nginx替代品?