自从最后几天以来,我所有的子域名都不再工作了。 我只得到一个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"