找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1906|回复: 6

lighttpd配置文件结构

[复制链接]
发表于 2017-5-23 17:11 | 显示全部楼层 |阅读模式

楼主 发表于: 2017-05-23 17:10:57
lighttpd配置文件 最近在做CGI相关的东西,用的服务器是lighttpd。
对他的配置文件不是太清楚。
主配置文件如下:
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
        "mod_redirect",
#       "mod_rewrite",
)

server.document-root        = "/var/www/html"
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"
server.port                 = 80


index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )

# default listening port for IPv6 falls back to the IPv4 port
## Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

除了主配置文件,在conf-available文件夹下面看到有很多子配置文件,如auth.conf,cgi.conf,ssl.conf等。
想请教下大神们,主配置文件是怎么和这些子配置文件关联起来的?
我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-5-23 17:31 | 显示全部楼层
好像有个include *.conf

点评

include *.conf这个在哪?我在主配置文件里面没有找到啊  发表于 2017-5-23 17:36
include *.conf这个在哪?我在主配置文件里面没有找到啊  发表于 2017-5-23 17:35
include *.conf这个在哪?我在主配置文件里面没有找到啊  发表于 2017-5-23 17:35
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-5-23 18:19 | 显示全部楼层
  1. server.modules = (
  2. )

  3. server.document-root        = "/www"
  4. server.upload-dirs          = ( "/tmp" )
  5. server.errorlog             = "/var/log/lighttpd/error.log"
  6. server.pid-file             = "/var/run/lighttpd.pid"
  7. server.username             = "http"
  8. server.groupname            = "www-data"

  9. index-file.names            = ( "index.php", "index.html",
  10.                                 "index.htm", "default.htm",
  11.                                 "index.lighttpd.html" )

  12. static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

  13. ### Options that are useful but not always necessary:
  14. #server.chroot               = "/"
  15. #server.port                 = 81
  16. #server.bind                 = "localhost"
  17. #server.tag                  = "lighttpd"
  18. #server.errorlog-use-syslog  = "enable"
  19. #server.network-backend      = "write"

  20. ### Use IPv6 if available
  21. #include_shell "/usr/share/lighttpd/use-ipv6.pl"

  22. #dir-listing.encoding        = "utf-8"
  23. #server.dir-listing          = "enable"

  24. include       "/etc/lighttpd/mime.conf"
  25. include_shell "cat /etc/lighttpd/conf.d/*.conf"
复制代码

点评

整个过程我现在搞清楚了。 现在整个配置结构是这样的:一个主配置文件lighttpd.conf,两个文件夹conf-available,conf-enabled. 如文件夹名所示,一个是存放所有模块的配置文件,一个是已经使能的配置模块。通过lig  详情 回复 发表于 2017-5-24 08:57
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2017-5-24 08:57 | 显示全部楼层

整个过程我现在搞清楚了。
现在整个配置结构是这样的:一个主配置文件lighttpd.conf,两个文件夹conf-available,conf-enabled.
如文件夹名所示,一个是存放所有模块的配置文件,一个是已经使能的配置模块。通过lighty-enable-mod xxx命令来使能需要添加的模块。
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"这一句就使主文件关联enabled的模块配置文件。
具体可以自己去看下include-conf-enabled.pl文件。

多谢大家。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-20 06:38

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表