我正在使用 Webmin 进行家庭服务器管理。
我不想在默认端口 ( https://myhost:10000 )上运行它,而是想将它托管在一个子文件夹 ( https://myhost/webmin/ ) 中。这在使用 Apache 时运行得非常好(Apache 配置文件附在下面)。但是,我通常使用 lighttpd,我想用 lighttpd 做同样的事情(在子文件夹中运行 Webmin)。但是,它不能正常工作。每当我访问https://myhost/webmin/ 时,都会收到以下消息:
Error - Bad Request
This web server is running in SSL mode. Try the URL https://localhost:10000/ instead.
Run Code Online (Sandbox Code Playgroud)
所以我更深入地研究了这个问题。我没有运行 Webmin,而是使用 netcat 监听 10000 端口。使用 lighttpd 时,我得到:
myhost@myhost:~$ nc -l 10000
GET /webmin/ HTTP/1.0
Host: myhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Cookie: testing=1
Cache-Control: max-age=0
X-Forwarded-For: 192.168.159.1
X-Host: …Run Code Online (Sandbox Code Playgroud) lighttpd ×1