lighttpd

Custom PHP FastCGI interface? (Faster?)

心已入冬 提交于 2019-12-24 01:53:54
问题 How do you build your own FastCGI interface in PHP? I'd like to do something similar to what they're doing in Perl, but in PHP. Is it even possible? Would it be faster? (That is, I'd like to be able to load a web app framework once into memory, and then just have FastCGI call a method I provide for every request. So not the more generic preloading of the PHP-interpreter that is happening in the "default" PHP FastCGI setup.) cheers! ( Edit : Isn't Mongrel and RoR doing this as well?) Ok I've

serving static files on Django production tutorial

大城市里の小女人 提交于 2019-12-23 09:09:40
问题 Does anyone have a simple step-by-step tutorial about serving static files on a Django production app? I read the Django docs and it sounds really complicated... I'm trying to go the route of serving static files using a different server like lighttpd, nginx, or cherokee, but setting these up is all Greek to me. I downloaded lighttpd, tried to follow the instructions to install, and within a few seconds got an error. Missing this or that or whatnot... I'm not a UNIX whiz and I'm not very good

X-Sendfile Error

扶醉桌前 提交于 2019-12-23 05:13:51
问题 I am trying to send files by using X-Sendfile directive in lighttpd. My php code is; header("Content-Type: application/force-download"); header( "Content-Disposition: attachment; filename=" . 's.php'); header("Content-Length: ". filesize("/home/web/domain/htdocs/download.php")); header( "X-Sendfile: /home/web/domain/htdocs/download.php"); (I am sending download.php file just for testing purpose) However, I get blank file no matter what I try. If I change the filename, I get; 2010-08-30 18:01

.htaccess rewrite to another port

六月ゝ 毕业季﹏ 提交于 2019-12-22 07:57:23
问题 I have a joomla setup in my /home/joomla directory. I installed both Apache and Lighttpd i have configured Lighttpd to proxy only static files, and lighttpd is listening on port 81. Now what i want is whenever request for static files are made, instead of going to www.domain.com/whatever/bg.jpg it should redirect to domain.com:81/whatever/bg.jpg using .htaccess also notice that www.domain.com changed to domain.com please please i need a quick help for it :) 回答1: Alright i found out the way :)

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

房东的猫 提交于 2019-12-21 23:47:18
问题 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

Lighttpd and cgi python

偶尔善良 提交于 2019-12-21 20:52:52
问题 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

Running Lua scripts using FastCGI

十年热恋 提交于 2019-12-21 18:13:15
问题 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. 回答1: I would recommend taking a look at this project: http://github.com/STPeters/luafcgid There are instructions on how to use it

Configuring lighttpd to handle CGI C executables

那年仲夏 提交于 2019-12-21 17:25:45
问题 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

Autotools: how to cleanup files created by “./configure” in lighttpd project?

风流意气都作罢 提交于 2019-12-21 06:48:54
问题 I'm trying out lighttpd for an embedded Linux project. I got the latest source package and started writing a master Makefile encapsulating all configure, compile, install (for testing) etc stuff. And vice-versa, I want to cleanup every step. After the cleanup there should be no generated files anymore. This is important for repetitive testing. I wonder if there is a way to do a complete cleanup of what ./configure generated? I'm not familiar with autotools in details. Any hints? 回答1: I

Different lighttpd rewrite rules in subirectory

孤人 提交于 2019-12-19 21:45:08
问题 I'm having a few issues getting rewrite rules for a specific subdirectroy (different from the webroot) and I'm at a loss as to where to put them. /var/www/ (webroot containing WordPress) /var/www/subdirectory (containing other app which requires it's own rewrite rules) The below rules I for WordPress which is in the webroot dir (/var/www, or http://mywebsite.com): $HTTP["host"] =~ "mywebsite.com" { url.rewrite-final = ( # Exclude some directories from rewriting "^/(wp-admin|wp-includes|wp