Articles of nginx

在实时服务器上添加一个用于PHP5的CLI

我想在我的服务器上添加对PHP5的命令行支持。 当我运行aptitude install php5-cli我收到一条消息,说我的PHP模块/软件包有未满足的依赖关系。 以下是受到这些“未满足的依赖性”和需求的升级的软件包列表: PHP5-GD PHP5curl PHP5-MySQL的 PHP5-CGI 他们都依赖于php5-common。 我可以像aptitudebuild议一样升级软件包,而不会对现场造成任何干扰吗? 从aptitude输出 Reading package lists… Done Building dependency tree Reading state information… Done Reading extended state information Initialising package states… Done The following packages are BROKEN: libapache2-mod-php5 php5-cgi php5-curl php5-gd php5-mysql The following NEW packages will be installed: php5-cli The following packages will be upgraded: […]

为nginx安装mp4 mod

我已经在我的服务器上安装了nginx,但我想添加位于http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Nginx-Version2的mp4。 如果在我的nginx目录下运行这些命令 ./configure –add-module=$HOME/nginx_mod_h264_streaming-2.2.7 –sbin-path=/usr/local/sbin –with-debug make sudo make install 我的旧configuration和文件会被覆盖吗? 如果是这样,我该怎么做,所以一切都与以前一样,但增加了mod?

在Arch上设置Passenger + Nginx

我试图在Arch上设置乘客和nginx,但是我似乎无法让nginx服务器启动。 我已经按照在这里find的指导: https : //wiki.archlinux.org/index.php/Nginx#Ruby_Integration_.28Ruby_on_Rails_and_Rack-based.29在选项A下使用ruby gems来进行安装。 我有nginx安装在/ opt / nginx /目录中。 我象征性地将/ opt / nginx / sbin / nginx链接到/ usr / bin / nginx,并添加了https://wiki.archlinux.org/index.php/Nginx/Init_script中的init脚本。 我也已经将权限更改为755,并且按照build议由root拥有。 当我运行sudo /etc/rc.d/nginx start时出现以下错误 /etc/rc.d/nginx: line 5: /etc/conf.d/nginx: No such file or directory :: Checking configuration [BUSY] nginx: [crit] pread() "/opt/nginx/" failed (21: Is a directory) nginx: configuration file /opt/nginx/ test […]

apache重写> nginx重写

我finnaly有nginx运行 我的网站是用codeigniter制作的,我从我的.htaccess这个旧的重写 #map all request urls to a specific controller method RewriteRule ^(.*)$ index.php?/welcome/domain/$1 [L] 我的问题是如何将其转换为工作的nginx重写规则?

在本地系统中是否可以同时使用LEMP和LAMP?

我是使用Linux系统的新手,我想知道我是否可以在同一个系统中同时运行LEMP和LAMP 。 我使用的是Fedora 14.如果我可以安装的话,是否有任何可能使我使用Apache(LAMP)的现有文件受到影响。

安装phpMyAdmin安装Apache

当我安装phpMyAdmin它会自动安装Apache。 即使我没有在phpMyAdmin的安装过程中selectApache并select不通过db-config进行安装,也会发生这种情况。 自从我使用Nginx以来,如何避免安装Apache? 我的设置是: – Debian Squeeze – 在source.list中设置dotdeb.org – nginx 1.0.11 – PHP 5.3

Nginx将子目录作为基础URL传递给Kohana

在Nginx上设置了多个Kohana应用程序后,我需要调整每个应用程序的“base url”参数。 之前当我用.htaccess使用Apache时,这很容易( RewriteBase ),但在Nginx中,我发现了以下解决scheme: location /sites/site1/ { try_files $uri /sites/site1/index.php?$args; } location /sites/site2/ { try_files $uri /sites/site2/index.php?$args; } …etc… 现在,因为我想添加更多的应用程序,我宁愿有一个location块传递Kohana应用程序到正确的path。 我试过这样的事情( 这对我来说不起作用 ): location /sites/([a-z0-9\-]+)/ { try_files $uri /sites/$1/index.php?$args; } 正如你所看到的,我不是一个正则expression式的专家,但我想通过任何现有的子目录名称包含字母数字字符和破折号对应的基本path。 谢谢。

nginx重写path中间的目录

我正在尝试执行以下nginxredirect /p/username 至 /profile/username 似乎应该是简单的,但我不知道如何隔离可变的用户名。

如何在Linux中find连接超时值?

我正在用php-fpm设置一个nginx web服务器,(d)dos deflate来禁止攻击。 现在目前根本没有stream量到我的服务器,因为我正在testing的东西。 通过这个命令,我可以看到谁连接到我的服务器,以及他们打开了多less个连接: netstat -ntu | awk'{print $ 5}'| 切-d:-f1 | sorting| uniq -c | 分类 在testing过程中,我注意到当我加载一个基本的<?php phpinfo(); ?> <?php phpinfo(); ?>它会启动3个连接。 我猜想1为HTML 2和该页面上的2个图像。 一切都很好,迄今为止… 但是我注意到在那三个closures之前花了一分多钟。 我一直运行上面的netstat命令,看看这3个外部连接是否会closures。 我的nginx.conf有一个保持活动超时4。 keepalive_timeout 4; 该连接是通过默认设置的Chrome浏览器进行的。 那么这些关系怎么会这么长久,这是正常的? 另外,有没有办法可以尽早closures它们?

nginx,追加/生活/每个请求www.a.com

我想追加一个string到每个引用根的请求。 例如)www.a.com – > www.a.com/life/ 我写了如下conf,但浏览器说有循环redirect: if ($host ~ 'www.a.com$') { rewrite ^/(.*)$ http://www.a.com/life/ permanent; } 如何写这个?