ここでは、私がLighttpdのカスタム設定MySQLのバーチャルホスト
を何をしたいのか、私はスタンドアローンのために私が実行したいウェブサイトを持っていますmod_mysql_vhosを使用してサブドメインX.siteB.maindomain.comをvhostできるようにしたい。ここで
は私のlighttpd.confファイルがどのように見えるかです:
server.modules = (
"mod_access",
"mod_alias",
"mod_accesslog",
"mod_compress",
"mod_mysql_vhost",
"mod_ssi",
"mod_rewrite"
)
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
ssi.extension = (".html")
server.document-root = "/var/www/maindomain/htdocs"
server.errorlog = "/var/log/lighttpd/error.log"
accesslog.filename = "/var/log/lighttpd/access.log"
index-file.names = ("index.php", "index.html",
"index.htm", "default.htm",
"index.lighttpd.html")
fastcgi.debug = 1
static-file.exclude-extensions = (".pl", ".fcgi")
server.port = 80
server.bind = "11.22.33.44"
server.pid-file = "/var/run/lighttpd.pid"
dir-listing.encoding = "utf-8"
server.dir-listing = "disable"
server.username = "www-data"
server.groupname = "www-data"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ("text/plain", "text/html", "application/x-javascript", "text/css")
#include_shell "/usr/share/lighttpd/create-mime.assign.pl"
mysql-vhost.db = "vhost"
mysql-vhost.user = "lighttpd"
mysql-vhost.pass = "correct_password"
mysql-vhost.sql = "SELECT docroot FROM domains WHERE domain='?';"
mysql-vhost.hostname = "localhost"
mysql-vhost.port = 3306
$HTTP["host"] == "siteA.maindomain.com" {
server.document-root = "/var/www/siteA/htdocs"
accesslog.filename = "/var/www/siteA/htdocs/logs/access.log"
server.errorlog = "/var/www/siteA/htdocs/logs/error.log"
}
$HTTP["host"] == "siteB.maindomain.com" {
server.document-root = "/var/www/siteB/htdocs"
accesslog.filename = "/var/www/siteB/htdocs/logs/access.log"
server.errorlog = "/var/www/siteB/htdocs/logs/error.log"
}
は、このOKですか?
siteA.maindomain.comは問題ありません。
私はsiteB.maindomain.comのURLにアクセスできません。私は404を取得します。私は間違っています。
私は