我在configurationLighttpd服务托pipe在我的服务器上的各种服务时遇到问题。 Lighttpd作为一个前台,我有几个DNSlogging,每个不同的子域,redirect到同一台机器。
目标是通过主机将这些请求分发给各种其他Web服务器。
特别是,Discourse被设置为一个Docker容器。 embedded式Nginx监听容器的端口80 ,该端口通过Docker映射到服务器的端口3080 :
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7b115219788e local_discourse/app:latest "/sbin/runit" 11 weeks ago Up 8 weeks 0.0.0.0:3022->22/tcp, 0.0.0.0:3080->80/tcp
我在Lighttpd上启用了mod_proxy ,这里是configuration:
server.modules = ( "mod_access", "mod_alias", "mod_compress", "mod_redirect", "mod_rewrite", "mod_proxy", ) 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-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 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" $HTTP["host"] =~ "discourse.mydomain.com" { proxy.debug = 1 proxy.server = ( "" => ( "discourse" => ( "host" => "127.0.0.1", "port" => 3080, "fix-redirects" => 1 ))) }
我可以告诉电话正在到达某处 ,因为日志告诉我:
2014-11-17 21:15:55: (mod_proxy.c.1144) proxy - start 2014-11-17 21:15:55: (mod_proxy.c.1185) proxy - ext found 2014-11-17 21:15:55: (mod_proxy.c.1319) proxy - found a host 127.0.0.1 3080 2014-11-17 21:15:55: (mod_proxy.c.398) connect delayed: 10 2014-11-17 21:15:55: (mod_proxy.c.1000) proxy: fdevent-out 1 2014-11-17 21:15:55: (mod_proxy.c.1029) proxy - connect - delayed success 2014-11-17 21:15:55: (mod_proxy.c.969) proxy: fdevent-in 4 2014-11-17 21:15:55: (mod_proxy.c.667) proxy - have to read: 521 2014-11-17 21:15:55: (mod_proxy.c.969) proxy: fdevent-in 4 2014-11-17 21:15:55: (mod_proxy.c.667) proxy - have to read: 0
然而,当我去discourse.redacted.com时,我所拥有的只是一个空白页面 – 不是一个404错误,请记住你。
我错过了什么明显的?
还有其他日志我可以拉?
额外的信息:打电话给discourse.redacted.com:3080工作,让我在那里。