lighttpd

ASP.NET / Web.config: customErrors redirect only on a 404

﹥>﹥吖頭↗ 提交于 2019-12-04 20:41:26
问题 I have this scenario: A user comes to my site and followes a link, wich doesnt exists anymore, he should be redirected to a custom errorpage. (that works) If a user does something, that throws an error, he should see the Stacktrace and the real Errorpage. This is my current Web.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <customErrors> <error statusCode="404" redirect="/errors/404.htm" /> </customErrors> <compilation debug="true" strict="false" explicit="true"

Lighttpd configuration, . (dots) in my query string cause 404

半城伤御伤魂 提交于 2019-12-04 20:14:01
I have an address on my site like so: http://www.example.com/lookup?q=http%3A%2F%2Fgigaom.com%2F2010%2F10%2F10%2Fangry-birds-for-windows7-phone-dont-count-on-it%2F In this example, the dot in the 'gigaom.com' part of the query string is screwing with lighttpd and my rewrite rules. I get a 404 with the dot in, no 404 if I take the dot out. My rewrite rules are below. In case it makes a difference, I'm using symfony 1.4. If anyone could shed some light on this problem it would be much appreciated! url.rewrite-once = ( "^/(.*\..+)$" => "$0", "^/(.*)\.(.*)" => "/index.php", "^/([^.]+)$" => "/index

三大WEB服务器对比分析(apache ,lighttpd,nginx)

醉酒当歌 提交于 2019-12-04 19:27:06
一.软件介绍 (apache lighttpd nginx) 1. lighttpd Lighttpd 是一个具有非常低的内存开销, cpu 占用率低,效能好,以及丰富的模块等特点。 lighttpd 是众多 OpenSource 轻量级的 web server 中较为优秀的一个。支持 FastCGI, CGI, Auth, 输出压缩 (output compress), URL 重写 , Alias 等重要功能。 Lighttpd 使用 fastcgi 方式运行 php, 它会使用很少的 PHP 进程响应很大的并发量。 Fastcgi 的优点在于: · 从稳定性上看 , fastcgi 是以独立的进程池运行来 cgi, 单独一个进程死掉 , 系统可以很轻易的丢弃 , 然后重新分配新的进程来运行逻辑 . · 从安全性上看 , fastcgi 和宿主的 server 完全独立 , fastcgi 怎么 down 也不会把 server 搞垮 , · 从性能上看 , fastcgi 把动态逻辑的处理从 server 中分离出来 , 大负荷的 IO 处理还是留给宿主 server, 这样宿主 server 可以一心一意作 IO, 对于一个普通的动态网页来说 , 逻辑处理可能只有一小部分 , 大量的图片等静态 IO 处理完全不需要逻辑程序的参与 ( 注 1) · 从扩展性上讲 ,

Linux crontab简明demo

人走茶凉 提交于 2019-12-04 17:53:20
<pre> crontab文件的一些例子: 30 21 * * * /usr/local/etc/rc.d/lighttpd restart 上面的例子表示每晚的21:30重启apache。 45 4 1,10,22 * * /usr/local/etc/rc.d/lighttpd restart 上面的例子表示每月1、10、22日的4 : 45重启apache。 10 1 * * 6,0 /usr/local/etc/rc.d/lighttpd restart 上面的例子表示每周六、周日的1 : 10重启apache。 0,30 18-23 * * * /usr/local/etc/rc.d/lighttpd restart 上面的例子表示在每天18 : 00至23 : 00之间每隔30分钟重启apache。 0 23 * * 6 /usr/local/etc/rc.d/lighttpd restart 上面的例子表示每星期六的11 : 00 pm重启apache。 * */1 * * * /usr/local/etc/rc.d/lighttpd restart 每一小时重启apache * 23-7/1 * * * /usr/local/etc/rc.d/lighttpd restart 晚上11点到早上7点之间,每隔一小时重启apache 0 11 4 * mon-wed

Lighttpd and cgi python

99封情书 提交于 2019-12-04 14:57:28
I'm trying to execute some python scripts through lighttpd but when I try to run it, I only get a blank file which I'm asked to download. lighttpd.conf server.modules = ( "mod_access", "mod_alias", "mod_accesslog", "mod_compress", "mod_rewrite" ) server.port = 8080 server.bind = "127.0.0.1" server.document-root = "/var/www" 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

How to handle chunked encoding request properly?

杀马特。学长 韩版系。学妹 提交于 2019-12-04 14:25:28
I have two websites: one with Lighttpd with PHP and second with Apache and neither of this handle chunked transfer encoding properly. I send this request from my mobile, J2ME and there is no possibility to change this transfer type to any other. So my only way to go is to handle chunked transfer enconcoded requests in other way. Any solution will be good as long as I can enable it on my CentOS server where I can install and change everything that will be necessary. So my question is: how to handle chunked encoding request properly on server side? EDIT: Which version of PHP/Apache/LightHTTP are

Running Lua scripts using FastCGI

主宰稳场 提交于 2019-12-04 10:45:31
I am currently trying to figure out ways to run Lua scripts using FastCGI with either lighttpd or Nginx. The only thing I was able to dig up yet was WSAPI of the Kepler project. But I wonder if there are other possibilities. Important for me is: should be as lightweight as possible should be stable enough to use in a production environment Many thanks in advance. I would recommend taking a look at this project: http://github.com/STPeters/luafcgid There are instructions on how to use it with nginx. 来源: https://stackoverflow.com/questions/4063745/running-lua-scripts-using-fastcgi

fastcgi multiplexing?

社会主义新天地 提交于 2019-12-04 10:40:19
I'm in process of implementation of a fastcgi application, after reading fastCGI spec I've found a feature called "request multiplexing". It reminded me Adobe RTMP multiplexing back in the days that protocol was proprietary and closed. As far as I understand, multiplexing allows to reduce overhead of creating new connections to FCGI clients effectively interweaving requests chunks, and at the same time enabling "keep-alive" model to connection. Latter allows sending several requests over a single connection. First question is did I get it right? Next one is - after some googling I've found

Configuring lighttpd to handle CGI C executables

穿精又带淫゛_ 提交于 2019-12-04 08:48:52
Does anyone know how to configure lighttpd to handle plain CGI executables, in this case written in C? I have compiled a test program (test.cgi) and put it in $HOME/public_html/cgi-bin. I have also enabled the CGI module with lighty-enable-mod cgi and restarted the web server. Still, when requesting http://localhost/~august/cgi-bin/test.cgi the program is not run but is instead treated as a static file. Here is my test program by the way: #include <stdio.h> int main(void) { printf("Content-type: text/plain\n\n"); puts("test..."); return 0; } The default CGI configuration looks like this: $HTTP

socket: Too many open files (24) apache bench lighttpd

眉间皱痕 提交于 2019-12-04 07:40:58
问题 When I start Apache Bench test: ab -n 10000 -c 1300 http://domain.com/test.php I get error: socket: Too many open files (24) When i change to '-c 1000' it works fine. Because I can have more than 1000 concurrent users I would like to fix socket too many open files problem or increase parameter. How to do this and where? I use lighttpd on centos 5. 回答1: ulimit -n 10000 That might not work depending on you system configuration Consult this to configure your system. 回答2: to permernent change max