lighttpd

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

孤者浪人 提交于 2019-12-02 15:09:19
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. ulimit -n 10000 That might not work depending on you system configuration Consult this to configure your system. to permernent change max opened files limit, you should modify /etc/security/limits.conf and reboot system: echo -ne " * soft nofile

Running Python scripts from HTML button

牧云@^-^@ 提交于 2019-12-02 12:38:17
问题 P am trying to implement a button that will run a Python script forward.py (move my robot forward) using Lighttpd web server/PHP 7.0. The Python script works perfectly when executed in the terminal window however when I try to run it from the click of the button it does not work. Here is my basic HTML code to execute the .py script: <html><body> <h1> Development of Internet controlled robot </h1> <input type="button" name="forwardbutton" value=" Move forward "onClick="<? exec(' python /var

Regex help. Lighttpd rewrite rule

帅比萌擦擦* 提交于 2019-12-02 11:19:29
问题 I am not very familiar with Regular expression, but I am asked to modify a lighttpd rewrite rule. url.rewrite = ( "^/(.+)/?$" => "/index.php/$1" ) I want to exclude a path from the above greedy pattern, so that it won't fall back to index.php . In words, it is simple: Match anything other than "statistics". But I just couldn't get it right in regex. For example: http://www.foo.com/anything/ → index.php/anything http://www.foo.com/statistics/ → statistics/index.php Would you please show me a

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

前提是你 提交于 2019-12-02 05:49:23
一.软件介绍 (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) · 从扩展性上讲 ,

Regex help. Lighttpd rewrite rule

六月ゝ 毕业季﹏ 提交于 2019-12-02 05:42:16
I am not very familiar with Regular expression, but I am asked to modify a lighttpd rewrite rule. url.rewrite = ( "^/(.+)/?$" => "/index.php/$1" ) I want to exclude a path from the above greedy pattern, so that it won't fall back to index.php . In words, it is simple: Match anything other than "statistics". But I just couldn't get it right in regex. For example: http://www.foo.com/anything/ → index.php/anything http://www.foo.com/statistics/ → statistics/index.php Would you please show me a hint to achieve that? Thank you! You probably want to use a negative lookahead. Something like "^/(?

Running Python scripts from HTML button

寵の児 提交于 2019-12-02 03:29:31
P am trying to implement a button that will run a Python script forward.py (move my robot forward) using Lighttpd web server/PHP 7.0. The Python script works perfectly when executed in the terminal window however when I try to run it from the click of the button it does not work. Here is my basic HTML code to execute the .py script: <html><body> <h1> Development of Internet controlled robot </h1> <input type="button" name="forwardbutton" value=" Move forward "onClick="<? exec(' python /var/www/html/forward.py'); ?>"> </body></html> I have changed the owner of the forward.py script to be www

How to handle relative paths in node.js / express?

久未见 提交于 2019-12-01 18:12:36
I've written a website in node.js and express. Now I configured lighttpd to use the node.js server with an subdirectory: $HTTP["url"] =~ "^/app/" { proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 3000 ) ) ) } When I open http://localhost/app/ I get error 404 because I wrote something like this: app.get('/', function (req, res){ res.render('index'); }); Is there a better way as modifying these lines like: var relPath = '/app'; app.get(relPath + '/', function (req, res){ res.render('index'); }); ? As Ryan commented the solution is: app.use('/app', app.router); If you use e.g. express

using .asmx using lighttpd and mono fastcgi

倖福魔咒の 提交于 2019-12-01 12:41:55
问题 I have deployed a web service to a ubuntu server running lighttpd and fastcgi-mono-server2. The .asmx page loads correctly but when I test the method I get a 404. My web service is called Import.asmx and my method is called download and the 404 comes back saying import.asmx/download does not exist Using xsp2 the same service works perfectly I assume it is something to do with how the /download gets served by lighttpd/fastcgi but cannot work out how to fix it. 回答1: Solved the 404 error... but

secure streaming of videos

只愿长相守 提交于 2019-12-01 11:56:59
问题 im using jwplayer i want the users to view the videos but not download them generating hashed url of videos was the one i found to do it im using lighttpd mod on the server that creates the hash, and using it i create the url for the videos timeout : expire every 30 minutes from when hash is created the problems comes when i play the videos the second time the page loads as follows: the page loads, there are currently 2 videos that show on each page, a div is created for each of the videos

Apache - how to limit maximum download speed of files? (if not apache, i can run lighthttpd)

浪子不回头ぞ 提交于 2019-12-01 06:10:55
I have a bunch of videos but I only want to limit the maximum download speed for these files to be 1mbps. How can I set this up (ideally in Apache but lighthttpd is an option) thanks If you only want to limit the download speed per connection, without any regard for managing the totals or performing more fine-grained controls, the best way to handle this is to use Apache's own mod_ratelimit . This example restricts everything under /files to 1Mbit/s ... <Location /files> SetOutputFilter RATE_LIMIT SetEnv rate-limit 1000 </Location> I've researched and tried other methods and modules, and in