Linux / UNIX Tech Support Forum
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 free or login to your account to remove all advertisements.
|
|||||||
| Web servers Discussion on Apache, Nginx and Lighttpd HTTP/web server and configuration issues. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
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" ) } |
|
|||
|
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/" } |
|
|||
|
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. What's wrong? I hope I am not making you uncomfortable... Never send a boy to do a mans job. |
|
||||
|
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
__________________
Vivek Gite |
![]() |
|
|
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 | 5th December 2007 02:58 PM |
| HOW TO HANDLE LOG FILES??? | ishu | Linux software | 2 | 10th August 2006 05:40 AM |
| Apache multiple IP based domains and one certificate | tom | All about FreeBSD/OpenBSD/NetBSD | 1 | 26th June 2006 07:23 PM |