Articles of lighttpd

PHP-FPM不处理PHP请求

我有一个奇怪的情况,我通过aptitude安装了lighttpd和php5-fpm 我创build了一个vhost和fpm池。 这是main.conf(全局FPM) [global] pid = /var/run/php-fpm.pid error_log = /home/lighttpd/log/php-fpm.log log_level = error emergency_restart_threshold = 5 emergency_restart_interval = 2 process_control_timeout = 2 daemonize = yes include=/home/lighttpd/vhosts/*/conf/php-fpm.conf 这是虚幻的池 [website.com] listen = 127.0.0.1:9000 listen.backlog = -1 user = website.com group = website.com pm = dynamic pm.max_requests = 0 pm.max_children = 2 pm.start_servers = 1 pm.min_spare_servers = 1 […]

当重新启动ligttpd时,如何获取fastcgi php-cgi的重新启动

我使用php5-cgi运行lighttpd。 运行/etc/init.d/lighttpd restart不会导致php-cgi进程重新启动。 我应该只是killall他们,还是有一个更合适的方式让他们重新启动?

强制连接closureslighttpd

我有一个M2M项目,发出以下标题。 HTTP/1.1 Accept-Language: zh-cn Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) Host: xxx.xxx.xxx.xxx:xxxx RANGE:bytes=0-1023 Connection: Keep-Alive Apache和ISS有connection : close在响应头中connection : close ,不pipe请求keep-alive 。 Lighttpd我假设实际上是正确执行,因为它确实保持连接活着,或不发送connection : close 。 我真的需要它来closuresM2M机器的连接。 我试过了 setenv.add-response-header = ( "connection" => "close" ) 但是这被忽略,无论如何强迫一个连接closures?

如何使lighttpd重新映射URL的一部分而不发送redirect?

和这里相同,但是对于lighttpd。 我在路上看到这样的照片: /0/1/2/3/4/01234/screenshots/1.jpg 访问它的URL如下所示: /static/0/1/2/3/4/01234/screenshots/1.jpg 我想看起来像这样: /0/1/2/3/4/01234/a-desc-of-the-picture/screenshots/1.jpg 或类似的东西。 目标是在SEO中的关键字。 但是想告诉nginx服务 /0/1/2/3/4/01234/screenshots/1.jpg 当他看到: /0/1/2/3/4/01234/a-desc-of-the-picture/screenshots/1.jpg 我不希望它将用户redirect到正确的URL,我只是希望它在内部做映射。 可能吗 ? 我怎样才能做到这一点?

lighttpd无法启动fastcgi后端。 我怎样才能解决这个问题?

我尝试在lighttpd上运行rails应用程序,但服务器无法启动,因为fastcgi-backend无法启动。 这是lighttpd的错误日志: 2011-08-02 20:43:15: (log.c.166) server started 2011-08-02 20:43:15: (mod_fastcgi.c.1104) the fastcgi-backend /opt/gemeinschaft/public/dispatch.fcgi failed to start: 2011-08-02 20:43:15: (mod_fastcgi.c.1108) child exited with status 13 /opt/gemeinschaft/public/dispatch.fcgi 2011-08-02 20:43:15: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version. If this is PHP on Gentoo, add 'fastcgi' to […]

Lighttpd代理模块 – 与主机名一起使用

我必须通过example.org上的lighty代理一个在外部网站上托pipe的网站。 我的configuration到目前为止: $HTTP["url"] =~ "^/webmail" { proxy.server = ("/webmail/" => ( # this entry should link to example2.org ("host" => "1.2.3.4", "port" => 80) )) } Web空间提供程序已将我的域configuration为vhost。 所以,如果我访问http://1.2.3.4/webmail/ lighttpd将只提供网站空间提供商的主要网站,说:“网站example.org没有在我们的服务器上find”。 任何build议如何我必须configurationlighty代理网站,只托pipe为虚拟主机(并没有自己的IP)?

Lighttpd:子域名会给出404错误

自从最后几天以来,我所有的子域名都不再工作了。 我只得到一个404错误/占位符页面。 我没有对Lighttpd.conf或10-simple-vhost.conf进行任何更改。 有没有类似的问题? 我该如何解决这个问题? 这是我的lighttpd.conf server.modules = ( "mod_access", "mod_alias", "mod_compress", "mod_redirect", "mod_rewrite", ) server.document-root = "/var/www/hosts" server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) server.errorlog = "/var/log/lighttpd/error.log" server.pid-file = "/var/run/lighttpd.pid" server.username = "www-data" server.groupname = "www-data" index-file.names = ( "index.php", "index.html", "index.htm", "default.htm", " index.lighttpd.html" ) url.access-deny = ( "~", ".inc" ) static-file.exclude-extensions = ( ".php", […]

使Lighttpd将.CSS文件视为.PHP文件

我希望扩展名为.CSS的文件被视为PHP,并且像parsing.PHP文件一样被parsing/执行(除了保留PHPparsing.PHP文件的默认行为)。 有Lighttpd做这个简单的方法吗?

lighttpd反向代理重写

我正在尝试将lighttpd (v1.5)configuration为反向代理。 咕噜在8080端口上运行,我已经按照以下步骤设置了lighttpd.conf : $HTTP["url"] =~ "^/wiki.*" { proxy-core.protocol = "http" proxy-core.backends = ("127.0.0.1:8080") proxy-core.rewrite-request = ("_uri" => ("^/wiki(.*)" => "/$1")) proxy-core.rewrite-response = ("_url" => ("^/(.*)" => "/wiki/$1")) } 请求正在转发好,但链接不被重写。 这种情况看起来类似于lighttpd 1.5反向代理来进行浏览 http://192.168.1.1/wiki/ 加载页面,但没有任何资源(CSS等),并且下面的链接不包括/wiki缀,例如: http://192.168.1.1/pages 重写规则如何在这种情况下工作?

lighttpd + php-cgi:如果php文件中有语法错误,内存疯狂地增加

我使用lighttpd作为networking服务器,模块mod_fastcgi打开。 所以我可以用lighttpd获取php file 。 这是我的configuration文件的一部分。 fastcgi.server =( ".php"=> ( ( "bin-path" => "/usr/local/webserver/php/bin/php-cgi", "socket" => "/data/online/webim/socket/php-fcgi.socket", "min-procs" => 100, "max-procs" => 100, "check-local" => "disable", "bin-environment" => ( "PHP_FCGI_CHILDREN" => "10", "PHP_FCGI_MAX_REQUESTS" => "1000" ), "bin-copy-environment" => ( "PATH", "SHELL", "USER" ), "broken-scriptfilename" => "enable" ) ) ) 有一次,我犯了一个错误。 syntax error留在php文件中。 然后,我发送了很多(10000)的请求到networking服务器。 很快,php-cgi使用的内存开始increase crazily地increase crazily […]