从前几天开始,我的所有子域名都不再起作用了。我只收到 404 错误/占位符页面。我没有对 Lighttpd.conf 或 10-simple-vhost.conf 进行任何更改。
有没有人遇到过类似的问题?我该如何解决?
这是我的 lighttpd.conf
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
)
server.document-root = "/var/www/hosts"
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"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
" index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
include_shell "/usr/share/lighttpd/use-ipv6.pl"
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
$HTTP["host"] =~ "^www\.(.*)$" {
url.redirect = ( "^/(.*)" => "http://%1/$1" )
}
$HTTP["host"] =~ "^(www\.)?cake-up\.de$" {
url.redirect = ("^/(.*)" => "http://www.example.com/$1")
}
$HTTP["host"] =~ "^(www\.)mail.cakeup\.de$" {
url.redirect = ("^/(.*)" => "http://mail.example.com/webmail")
}
以下是我的一个子域名的示例
$HTTP["host"] == "stage.example.come" {
# block 1
server.name = "stage.example.com"
var.user = "fwirths"
var.hostdir = "/var/www/hosts/stage.example.com/"
server.document-root = "/var/www/hosts/stage.example.com/www"
var.logdir = "/var/www/hosts/stage.example.com/logs/"
accesslog.filename = "/var/www/hosts/stage.example.com/logs/access.log"
server.errorlog = "/var/log/lighttpd/error.log"
server.follow-symlink = "enable"
server.dir-listing = "disable"
fastcgi.server = (
".php" => (
(
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket",
),
),
)
server.error-handler-404 = "/index.php"
index-file.names = ("index.php", "index.html")
} # end of $HTTP["host"] == "stage.example.com"