This is a discussion on lighttpd domain and subdomain settings within the Web servers forums, part of the Mastering Servers category; kindly help me shorten my domain and subdomain setting. I want the www.domain.com and domain.com work same with www.subdomain.domain.com and ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
kindly help me shorten my domain and subdomain setting. I want the www.domain.com and domain.com work same with www.subdomain.domain.com and subdomain.domain.com
I currently have the following Code:
$HTTP["host"] =~ "www.mydomain.info" {
server.document-root = "/home/mydomain/www"
server.errorlog = "/var/log/lighttpd/mydomain.info/error.log"
accesslog.filename = "/var/log/lighttpd/mydomain.info/access.log"
}
$HTTP["host"] =~ "mydomain.info" {
server.document-root = "/home/mydomain/www"
server.errorlog = "/var/log/lighttpd/mydomain.info/error.log"
accesslog.filename = "/var/log/lighttpd/mydomain.info/access.log"
}
$HTTP["host"] =~ "forums.mydomain.info" {
server.document-root = "/home/mydomain/subdomains/forums"
server.errorlog = "/var/log/lighttpd/forums.mydomain.info/error.log"
accesslog.filename = "/var/log/lighttpd/forums.mydomain.info/access.log"
}
$HTTP["host"] =~ "www.forums.mydomain.info" {
server.document-root = "/home/mydomain/subdomains/forums"
server.errorlog = "/var/log/lighttpd/forums.mydomain.info/error.log"
accesslog.filename = "/var/log/lighttpd/forums.mydomain.info/access.log"
}
|
| Sponsored Links | ||
|
|
|
|||
|
I wanna use wild cards so both www.domain.com and domain.com will go to
server.document-root = "/home/mydomain/www" www.subdomain.domain.com and subdomain.domain.com will go to /home/mydomain/subdomains/forums so instead of having four "blocks" of codes, I'll only have two. hope you could help me. I'm a big fan of your tutorials at cyberciti.biz that's why I was able to install lighttpd thanks again |
|
||||
|
You can try as follows:
Code:
$HTTP["host"] =~ "(^|\.)mydomain\.info$" {
server.document-root = "/home/mydomain/www"
server.errorlog = "/var/log/lighttpd/mydomain.info/error.log"
accesslog.filename = "/var/log/lighttpd/mydomain.info/access.log"
}
$HTTP["host"] =~ "(^|\.)forums\.mydomain\.info$" {
server.document-root = "/home/mydomain/subdomains/forums"
server.errorlog = "/var/log/lighttpd/forums.mydomain.info/error.log"
accesslog.filename = "/var/log/lighttpd/forums.mydomain.info/access.log"
}
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk - Removing domain name entires | nvbhole | Shell scripting | 0 | 12-18-2007 11:14 AM |
| wi-fi connection and Domain login on windows | surmandal | Computer Networking and Internet/broadband | 2 | 08-03-2007 06:51 PM |
| Howto remove the iptables settings on Linux | sweta | Getting started tutorials | 0 | 07-27-2007 06:52 AM |
| Masquerade domain sendmail how to | chiku | Mail Servers | 2 | 07-10-2007 08:20 AM |
| Help, samba 3.0.23 join ads domain | warren | Linux software | 1 | 01-09-2007 03:41 PM |