This is a discussion on Smartest way to handle domains (vhost) within the Web servers forums, part of the Mastering Servers category; First of all, GREAT site! Packed with useful information I'm currently setting up my first web server, using lighttpd. I'm ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
First of all, GREAT site! Packed with useful information
I'm currently setting up my first web server, using lighttpd. I'm using "simple-vhost.conf" to handle domains, which looks like this (pretty standard): Code:
server.modules += ( "mod_simple_vhost" )
simple-vhost.server-root = "/var/www/"
simple-vhost.document-root = "pages"
simple-vhost.default-host = "blah.se"
$HTTP["host"] =~ "^www\.(.*)" { url.redirect = ( "^/(.*)" => "http://%1/$1" ) }
|
| Sponsored Links | ||
|
|
|
|||
|
Aah, this seems to work pretty nice for domain/subdomain handling using evhost, but there's still the part with the log files.. Any ideas?
Code:
$HTTP["host"] =~ "^(www\.)?[^.]+\.[^.]+$" {
evhost.path-pattern = "/home/%0/www/"
}
$HTTP["host"] !~ "^(www\.)?[^.]+\.[^.]+$" {
evhost.path-pattern = "/home/%0/subdomains/%3/"
}
|
|
||||
|
Have you created /var/www/logs/ directory? See if you get logs there
Personally I am using something as follows (simple and easy to follow) Code:
$HTTP["host"] == "domain1.com" {
server.document-root = "/var/www/domain1.com"
server.errorlog = "/var/log/lighttpd/domain1.com/error.log"
accesslog.filename = "/var/log/lighttpd/domain1.com/access.log"
}
$HTTP["host"] == "domain2.com" {
server.document-root = "/var/www/domain2.com"
server.errorlog = "/var/log/lighttpd/domain2.com/error.log"
accesslog.filename = "/var/log/lighttpd/domain2.com/access.log"
}
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
|||
|
Yeah, I'm getting logs, but for all sites. Your solution doesn't automatically handle new domains, that's what I'm trying to achieve. Doesn't seem like Lighttpd handles this yet, there's a feature request in trac to extend support in mod_evhost.
|
|
||||
|
Hello,
Yup I’m understanding your problem. Have u tried something say like (i don't think so it will work but just try out..) Code:
server.errorlog = "/var/log/lighttpd/%0/error.log" accesslog.filename = "/var/log/lighttpd/%0/error.log"
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
||||
|
I recommend reading article - Flexible vhost lighty config which utilize some scripts ruby and shell to create configuration along with lighttpd vars.
http://blog.ardes.com/articles/2006/...-lighty-config |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| running multiple privilegded domains | namitha | XEN | 0 | 12-05-2007 02:58 PM |
| HOW TO HANDLE LOG FILES??? | ishu | Linux software | 2 | 08-10-2006 05:40 AM |
| Apache multiple IP based domains and one certificate | tom | All about FreeBSD/OpenBSD/NetBSD | 1 | 06-26-2006 07:23 PM |