lighttpd

Apache rewrite rule to lighttpd

二次信任 提交于 2019-12-11 12:59:20
问题 How to convert this apache rewrite rule to lighttpd rewrite rule? # Turn on URL rewriting RewriteEngine On # Installation directory RewriteBase /adpanel/ # Protect hidden files from being viewed <Files .*> Order Deny,Allow Deny From All </Files> # Protect application and system files from being viewed RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L] # Allow any files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST

Adding subdomain support into lighttpd

牧云@^-^@ 提交于 2019-12-11 12:08:16
问题 I have a lighttpd server with website placed in /home/httpd/example.com/httpdocs and there I have a file called file.php . When I type http://en.example.com/file.php I would like to display file.php that is in default website directory (mentioned above). So I used document-root described here: http://redmine.lighttpd.net/wiki/1/Server.document-rootDetails in this manner: $HTTP["host"] =~ "en.example.com/file.php" { server.document-root = "/home/httpd/example.com/httpdocs/" } But unfortunately

How to tell the browser to forget htdigest?

好久不见. 提交于 2019-12-11 00:09:57
问题 I use Htdigest authentication with lighttpd. When the user first logs in to the website, a standard username/password dialogue box is presented. If correct username and password is entered, user can login, otherwise lighttpd shows an Authentication failure page. So far so good! The problem is when the user wants to logout, the browser doesn't forget the username and password. In other words as long as the browser is open, user can return to the same site without being asked to authenticate.

Make lighttpd listen on multiple ports

时光总嘲笑我的痴心妄想 提交于 2019-12-10 17:34:34
问题 I have a lighttpd server running on an AWS EC2 instance. It can serve on port 80 (or any other port, if I change server.port in /etc/lighttpd/lighttpd.conf) with no problems. However, when I serve an alternative document-root on a different port (say, 8080), browsers can never connect to the server. The relevant section of my lighttpd.conf file: server.port = 80 ## ## Use IPv6? ## server.use-ipv6 = "disable" ## ## bind to a specific IP ## #server.bind = "localhost" ## ## Run as a different

apache .htaccess file on lighttpd

China☆狼群 提交于 2019-12-10 15:24:45
问题 RewriteEngine on RewriteRule ^packed\.js$ pack.php?debug=0 [nc] RewriteRule ^debug$ pack.php?debug=1 [nc] That worked fine on apache in a .htaccess file placed in a specific directory. If I want to do this on lighttpd, do I have to add it in the config file or something? Would I need to make any changes to these rules? 回答1: lighttpd doesn't support .htaccess files like Apache httpd does. That's where the "light" in "lighttpd" comes into play. You can, however, migrate these rules from Apache

FastCGI on Windows and Lighttpd

风格不统一 提交于 2019-12-10 11:09:10
问题 I'm looking to make my CGI forum software FastCGI compatible. The forum software consists of a few dlls and .exe (.cgi) files written in C and x86 assembly language. I also have a SQlite3 database. Lighttpd runs all these cgi scripts as child processes and I much say that the whole thing works pretty damn well. But I want to experiment with FastCGI. However, the examples are poor, the documentation is poor, and it really looks like it's made for Linux in mind. Did someone get FastCGI working

Lighttpd Reverse Proxy Settings

大兔子大兔子 提交于 2019-12-10 06:33:34
问题 I am trying to configure Lighttpd to act as a reverse proxy. I want to have several URLs that are proxied to different servers on different ports, either on the same machine or within the local network. For example: / /static /socket /ajax Lighttpd would proxy all of the connections except those to /static . I want to serve all requests to /static directly from this instance of lighttpd. Here is the config file for mod_proxy: ## # Serve Static Content via Lighttpd. # $HTTP["url"] =~ "^/static

JavaWeb网站性能优化的相关技术

拈花ヽ惹草 提交于 2019-12-10 02:09:43
一、提高服务器并发处理能力 我们总是希望一台服务器在单位时间内能处理的请求越多越好,这也成了web服务器的能力高低的关键所在。服务器之所以可以同时处理多个请求,在于操作系统通过多执行流体系设计,使得多个任务可以轮流使用系统资源,这些资源包括CPU、内存以及I/O等。这就需要选择一个合适的并发策略来合理利用这些资源,从而提高服务器的并发处理能力。这些并发策略更多的应用在apache、nginx、lighttpd等底层web server软件中。 二、Web组件分离 这里所说的web组件是指web服务器提供的所有基于URL访问的资源,包括动态内容,静态网页,图片,样式表,脚本,视频等等。这些资源在文件大小,文件数量,内容更新频率,预计并发用户数,是否需要脚本解释器等方面有着很大的差异,对不同特性资源采用能充分发挥其潜力的优化策略,能极大的提高web站点的性能。例如:将图片部署在独立的服务器上并为其分配独立的新域名,对静态网页使用epoll模型可以在大并发数情况下吞吐率保持稳定。 三、数据库性能优化和扩展。 Web服务器软件在数据库方面做的优化主要是减少访问数据库的次数,具体做法就是使用各种缓存方法。也可以从数据库本身入手提高其查询性能,这涉及到数据库性能优化方面的知识本文不作讨论。另外也可以通过主从复制,读写分离,使用反向代理,写操作分离等方式来扩展数据库规模,提升数据库服务能力。 四

lighttpd 集成 golang

爷,独闯天下 提交于 2019-12-09 15:47:41
#lighttpd 集成 golang Author: nullchen Email: 526624974@qq.com ##简介: 我们业务用fastcgi做接入,抽空研究了下fcgi如何运行在httpserver之上,主要是fcgi与httpserver的通信,在这里简单的记录一下。由于qzhttp是非开源的,这里以lighttpd位对象,进行学习。本文分两部分,第一部分简单的分析lighttpd如何与fastcgi应用通信,在此基础上,第二部分位了对第一部分的结论进行验证,简单的将golang用fastcgi的方式集成到lighttpd中,让lighttpd管理golang进程,从而实现 多进程+多线程+多协程 的模式。 ##第一部分 为了描述清楚,我们首先按照功能进行角色划分如下: fastcgi client: fastcgi client的功能主要是将收到的http请求转换成fastcgi请求发送给fastcgiserver,收到应答后转换成http格式的应答并发送给http请求者。lighttpd具有fastcgi client的功能。 fastcgi server: fastcgi server的主要功能主要是进行进程的管理。并在各个进程中执行fastcgi application。从而使fastcgi application专注于业务逻辑

RewriteRule for htaccess to hide default language

旧城冷巷雨未停 提交于 2019-12-08 09:54:47
问题 In Zend configuration defaults I have these rules: SetEnv APPLICATION_ENV offline RewriteEngine On Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] When i try to add fallowing line, notfing happens: RewriteRule ^en/(.*) $1 [L] On result I expact to rewrite permomently http://example.com/en/something to http://example.com/something At now I have