Articles of lighttpd

Lighttpd单个子域redirect/重写

这是最初的问题在stackoverflow ,但环顾四周,我得到了一个舒服的感觉,有人会知道答案。 我正在使用lighttpd,并希望有一个页面的urlpath显示为子域。 例如,我有以下url: http://test.com/blog/… 我想显示在浏览器的url为: http://blog.test.com/… 其他细节: blog.test.com已经是与test.com相同的服务器上的现有子域。 这是一个单独的Wordpress安装。 我们只是试图让一切下的一切,但保持子域的path。 什么是最好的方式去做这个?

使用Lighttpd升级PHP LDAP

我在使用Lighttpd(lighty)和PHP在Archlinux环境中启用LDAP时遇到了一些困难。 我已经下载并安装了php-ldap模块,在php.ini中启用它,phpinfo()在“configuration命令” '–with-ldap=shared' '–with-ldap-sasl' 这对我来说表示它已启用。 但是,当我使用LDAP命令(如ldap_connect() ,会抛出一个“未定义的函数”错误。 我杀了Lighttpd进程,并在testing之前再次启动它。 我还安装了所需的软件包libldap和libsasl 。

服务器不会回复POST请求

我正在开发一个WordPress站点,它由F5负载均衡器后面的两个lighttpd后端提供服务。 以前,该网站是由一个nginx反向代理背后的一个lighttpd服务器提供的,一切正常。 现在,有时从WordPresspipe理员发送POST信息(例如,编辑常规选项或编辑导航菜单时),站点将不会回复任何内容。 我知道它正在接收请求,因为它实际上更新了信息,但是浏览器从来没有得到响应。 我在WordPressdebugging日志或lighttpd日志中没有看到任何exception情况,所以我猜这就是与负载平衡器有关的问题。 你能想到这种行为的任何理由吗?

在一个主机上部署多个django实例

我想在lighttpd的一个主机上设置多个Django实例。 我的问题是让Djangos FCGI在由我的Web服务器提供的子目录上工作。 所以我的目标是: www.myhost.org/django0 – > localhost:3000上的django1.fcgi www.myhost.org/django1 – > localhost:3001上的django2.fcgi www.myhost.org/django2 – > localhost:3002上的django3.fcgi 不幸的是,下面的configuration甚至不适用于一个: $HTTP["url"] =~ "^/django0/static($|/)" { server.document-root = "/home/django0/django/static/" } $HTTP["url"] =~ "^/django0/media($|/)" { server.document-root = "/usr/lib/python2.7/dist-packages/django/contrib/admin/media/" } $HTTP["url"] =~ "^/django0($|/)" { proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => "3001", "check-local" => "disable", ) ) […]

如何阻止在lighttpd请求robots.txt的url?

我们有一个专门的开发服务器,只在公共networking上运行testingPHP应用程序。 我们已经为该站点设置了基于会话的身份validation。 我们遇到的问题是robots.txt的访问日志中logging了很多404。 所以,我们想要阻止/忽略lighttpd上的这些请求来节省一些带宽。 我们如何在lighttpd / 1.4.31中做到这一点?

单声道3.0.2 + xsp + lighttpd提供空白页面

我需要MVC 4(和基本的.NET 4.5)支持,所以我下载了单声道3.0.2,并将其部署在lighttpd 1.4.28安装上,与xsp-2.10.2(是我能find的最新版本)一起安装。 在完成configuration教程之后,我设法让fastcgi服务器产生,但是所有的页面都是空的。 即使我去到不使用的URL或直接.aspx文件,我得到一个空的HTTP 200响应。 Debug上的日志文件不会显示任何可疑内容。 这里是日志: [2012-12-12 15:15:38Z] Debug Accepting an incoming connection. [2012-12-12 15:15:38Z] Debug Record received. (Type: BeginRequest, ID: 1, Length: 8) [2012-12-12 15:15:38Z] Debug Record received. (Type: Params, ID: 1, Length: 801) [2012-12-12 15:15:38Z] Debug Record received. (Type: Params, ID: 1, Length: 0) [2012-12-12 15:15:38Z] Debug Read parameter. (SERVER_SOFTWARE […]

在Lighttpd中为两台主机configurationmod_rewritte

在使用Lighttpd的两台主机上configurationmod_rewrite时遇到问题。 我有一个是旧的更新版本。 旧的不使用mod_rewrite ,而新的。 但问题是,如果我在lighttpd.conf启用该模块,那么即使在我没有configuration它来进行任何redirect的情况下,旧的也会redirect。 这是我的conf文件: $HTTP["host"]=~"test.org" { server.document-root = "/var/www/virtual/acruz/www/public/" server.errorlog = "/var/www/virtual/acruz/logs/error.log" accesslog.filename = "/var/www/virtual/acruz/logs/access.log" url.rewrite-once = ( ".*\.(js|ico|gif|jpg|png|css|)$" => "$0", "^/.*(\?.*)" => "/index.php$1", "" => "/index.php" ) } $HTTP["host"]=~"r5.test.org" { server.document-root = "/var/www/virtual/acruz/r5/" server.errorlog = "/var/www/virtual/acruz/logs/error.log" accesslog.filename = "/var/www/virtual/acruz/logs/access.log" setenv.add-environment = ("env" => "acruz") }

lighttpd可以configuration为在Windows7上产生自己的PHP实例?

目前,这是我如何启动PHP和lighttpd,它工作正常: start /b php-cgi -c .\php-debug.ini -b 127.0.0.1:521 start /b LightTPD.exe 有一次PHP崩溃,我得到503错误,直到我再次启动它。 我想configurationlighttpd来pipe理PHP实例,所以它可以重新启动PHP。 我通过添加bin-path修改我的lighttpdconfiguration。 server.modules = ( "mod_access", "mod_accesslog", "mod_rewrite", "mod_redirect", "mod_evhost", "mod_fastcgi", "mod_status" ) fastcgi.server = ( ".php" => ( "localhost" => ( "host" => "127.0.0.1", "port" => 521, "bin-path" => "C:\PHP\php-cgi.exe", "broken-scriptfilename" => "enable" ) ) ) 当我启动lighttpd,我在我的错误日志中看到以下内容 – 无论是否运行PHP都没关系。 2013-01-26 16:23:20: (log.c.166) […]

Lighttpd和OpenCart GET请求与mod_rewrite

我们的OpenCart运行在Lighttpd上,我们使用mod_rewrite进行search引擎优化。 每当我们有我们的重写规则,GET请求,如http://www.site.com/dev/?gclid=XXX不起作用。 这里是我目前的OpenCart重写规则: server.modules += ( "mod_rewrite" ) url.rewrite = ( "^(.*)–v[^/]*–(.*)$" => "$1$2" ) url.rewrite-once = ( "^/dev/$" => "/dev/index.php?route=common/home") url.rewrite-if-not-file = ( "^/dev/(.*)" => "/dev/index.php?_route_=$1") 我需要添加哪些规则来启用GET请求?

Lighttpd + Node.JS(通过ModProxy) – 500内部服务器错误

在我的lighttpd,conf文件的顶部,我有以下内容 server.modules = ( "mod_access", "mod_alias", "mod_compress", "mod_redirect", # "mod_rewrite", "mod_proxy" ) 在底部我join proxy.server = (".js" => ( ( "host" => "127.0.0.1", "port" => 3000 ) )) 如果我去我的JS文件(包含console.log('test'); )我得到一个内部服务器错误 我试图把它放在一个$ HTTP [“主机”]条件,并删除.js但都不工作 节点是好的,如果我从命令行运行node test.js ,它的工作原理