我有一个URL的问题。 我可以访问djando应用程序主页(localhost / djangotest /),但不能访问pipe理部分(localhost / djangotest / admin /)。 我可以使用django服务器而不是lighttpd访问它。 Lighttp conf: fastcgi.server = ( "/djangotest/" => ( "main" => ( "host" => "127.0.0.1", "port" => 3033, "check-local" => "disable", ) ), ) url.rewrite-once = ( "^(/media.*)$" => "$1", "^/favicon\.ico$" => "/media/favicon.ico", "^/djangotest/[^?](.*)$" => "/djangotest/?$1", ) Django的url.py只是:(我只是取消注释好行): from django.conf.urls.defaults import patterns, include, url from […]
我有问题,如果有可能在发生404错误时运行mod_rewrite规则。 例: 要求: http : //domain.com/files/img/file.jpg 如果没有/files/file.jpg ,那么Lightttpd应该重写请求到文件/files2/img/file.jpg 如何在lighttpd / mod_rewriteconfiguration文件中做到这一点?
这是我第一次自己设置一个web服务器。 另外,我不熟悉Linux,所以如果我要问一些愚蠢的问题,请原谅我… 我已经安装lighttpd,一切似乎正常工作。 我将其设置在一个Virtualbox中,并使用桥接networking设置从我的主操作系统访问它。 一切工作到目前为止,我可以在我的浏览器中访问它就好了。 唯一的问题是没有findindex.php / index.html文件。 如果我把文件重命名为index1.php比我可以访问它并在浏览器中查看它。 只要我再次命名它的index.php ,它从虚拟目录中消失,当我尝试直接访问它,我得到一个404错误。 index.html发生同样的错误 我没有修改默认的lighttpd很多期望一些行php,phpmyadmin和自定义404错误: http : //codepad.org/86ktIq5k
目前,我们正在使用Amazon CloudFront来服务css,根据Amazon本身,Amazon CloudFront可以从原始服务器提供压缩和未压缩文件。 但是,当我检查压缩它显示一切在原始服务器罚款,但它显示未压缩检查与云端的链接。 例如http://www.port80software.com/tools/compresscheck.asp?url=http%3A%2F%2Fimgsrv.mydomain.com%2Fen-UK%2Fsomething.css 它会导致压缩状态:(gzip) 而与云端 http://www.port80software.com/tools/compresscheck.asp?url=http%3A%2F%2hereisit.cloudfront.net%2F%2Fsomething.css 压缩状态:未压缩 Origin服务器使用mod_deflate运行lighttpd,但是允许的configuration是: deflate.allowed_encodings = ("bzip2", "gzip", "deflate") [我会想,把额外的编码不会影响这样的。] 在这里,我很无能,真正的问题是什么。
我最近安装了一个lighttpd,通过mod_fastcgi为python脚本提供服务。 一切工作正常,但我没有得到mod_fastcgi处理access.log文件中logging的请求(端口80上的请求被logging,虽然)。 我的lighttpd版本在Debian 6.0上是1.4.28。 我用相同的工作configurationUbuntu的服务器10.04与lighttpd 1.4.26,它的工作。 这是我的configuration lighttpd.conf server.modules = ( "mod_access", "mod_alias", "mod_accesslog", "mod_compress", ) server.document-root = "/var/www/" server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) server.errorlog = "/home/log/lighttpd/error.log" index-file.names = ( "index.php", "index.html", "index.htm", "default.htm", "index.lighttpd.html" ) accesslog.filename = "/home/log/lighttpd/access.log" url.access-deny = ( "~", ".inc" ) static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) server.pid-file = "/var/run/lighttpd.pid" […]
我想在gentoo机器上用fastcgi在lighttpd上运行Django站点。 每次我尝试访问该网站时,我都会在10秒左右之后得到回应。 我使用套接字让lighttpd与我的Django站点通信,但一个TCP端口也没有帮助。 这可能是一个lighttpd问题? 我试图从互联网服务器以及从localost,这是lighttpd给我在error.log 2012-07-10 14:36:36: (response.c.300) — splitting Request-URI 2012-07-10 14:36:36: (response.c.301) Request-URI : / 2012-07-10 14:36:36: (response.c.302) URI-scheme : http 2012-07-10 14:36:36: (response.c.303) URI-authority: owntube 2012-07-10 14:36:36: (response.c.304) URI-path : / 2012-07-10 14:36:36: (response.c.305) URI-query : 2012-07-10 14:36:36: (response.c.300) — splitting Request-URI 2012-07-10 14:36:36: (response.c.301) Request-URI : /owntube.fcgi/ 2012-07-10 14:36:36: (response.c.302) URI-scheme […]
我在configurationNginx代替Apache时遇到了一些问题,所以它为客户端提供了Mumble Django服务。 我有vhosts configuration为Apache和Lighttpd – 让我把他们放在这里并排,为您节省点击:)。 Apache2利用WSGI作为CGI运行Django Python。 就我所见,Lighttpd就像Nginx / PHP-FPM一样工作。 专用的Apache2虚拟主机 – configuration: <VirtualHost *:80> ServerName example.com ServerAlias www.example.com Alias /static/admin/ /usr/share/pyshared/django/contrib/admin/static/admin/ Alias /static/ /srv/mumble-django/htdocs/ Alias /mumble/media/ /srv/mumble-django/pyweb/mumble/media/ WSGIScriptAlias / /srv/mumble-django/mumble-django.wsgi WSGIDaemonProcess mumble-django threads=25 WSGIProcessGroup mumble-django WSGIScriptReloading Off # Cache optimization – not necessarily needed for MD, but nice to have 🙂 FileETag None […]
目前,我正在与ViewVC的lighttpd的configuration挣扎。 configuration从Apache 2.2.x移植,它仍然在机器上运行,服务于WebDAV / SVN的东西,通过代理。 现在,我遇到的问题似乎与重写规则,我不知道我在这里错过了什么。 这里是我的configuration(略作简要说明): var.hgwebfcgi = "/var/www/vcs/bin/hgweb.fcgi" var.viewvcfcgi = "/var/www/vcs/bin/wsgi/viewvc.fcgi" var.viewvcstatic = "/var/www/vcs/templates/docroot" var.vcs_errorlog = "/var/log/lighttpd/error.log" var.vcs_accesslog = "/var/log/lighttpd/access.log" $HTTP["host"] =~ "domain.tld" { $SERVER["socket"] == ":443" { protocol = "https://" ssl.engine = "enable" ssl.pemfile = "/etc/lighttpd/ssl/…" ssl.ca-file = "/etc/lighttpd/ssl/…" ssl.use-sslv2 = "disable" setenv.add-environment = ( "HTTPS" => "on" ) url.rewrite-once += ("^/mercurial$" […]
我真正想要做的就是让'www-data'用户能够以另一个用户的身份启动php-cgi。 我只是想确保我完全理解安全性的含义。 服务器应该支持共享主机环境,其中各种(可能不受信任的)用户通过chroot来访问服务器的FTP来存储他们的HTML和PHP文件。 然后,由于PHP脚本可能是恶意的,读/写别人的文件,所以我想确保每个用户的PHP脚本以相同的用户权限运行(而不是以www数据运行)。 长话短说,我在/etc/sudoers文件中添加了以下行,并且想通过社区运行它作为完整性检查: www-data ALL = (%www-data) NOPASSWD: /usr/bin/php-cgi 这一行应该只允许www-data像这样运行一个命令(没有密码提示): sudo -u some_user /usr/bin/php-cgi …其中some_user是组www-data中的用户。 这有什么安全影响? 这应该允许我像这样修改我的Lighttpdconfiguration: fastcgi.server += ( ".php" => (( "bin-path" => "sudo -u some_user /usr/bin/php-cgi", "socket" => "/tmp/php.socket", "max-procs" => 1, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "4", "PHP_FCGI_MAX_REQUESTS" => "10000" ), "bin-copy-environment" => ( "PATH", "SHELL", "USER" ), "broken-scriptfilename" […]
我试图使用最新的stream水游戏。 (如果它可以工作,这将是非常真棒顺便说一句) http://flowplayer.org 其中一个很酷的事情是它使用了新的HTML5video元素,并支持随机查找/回放。 为了做到这一点,你需要在后端有一个字节范围请求能力的服务器。 幸运的是我在后端使用Lighttpd 1.5.0。 不幸的是,目前的行为是,当我随机寻找时,video只是从一开始就重新开始。 文档说: “对于HTML5video,您不必进行任何客户端configuration,如果您的服务器支持字节范围请求,则应该尽快find,大多数服务器,包括Apache,Nginx和Lighttpd都支持。 在我的页面上,使用chrome web开发者工具,我可以看到video什么时候被请求,服务器响应标头指出它能够接受字节范围。 接受-范围:字节 当我在播放器中进行随机search时,我可以看到请求头中的字节范围是正确的请求: 范围:字节= 5668-10785 我也可以validationmoovprimefaces是在video文件的前面。 我在这里的问题是,如果有什么其他的lighttpd方面我失踪,以便启用字节范围请求? 我问的原因是因为目前的行为表明,lighttpd根本不理解字节范围请求,只是从一开始就保留video。 更新 把这个放在这里更清楚。 根据RJS的build议,我执行了一个curl命令。 在响应中,它看起来像lighttpd正在按预期工作。 内容范围:字节1602355-18844965 / 18844966 内容长度:17242611