nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Lighttpd socket with multiple subdomains or single IP

This is a discussion on Lighttpd socket with multiple subdomains or single IP within the Web servers forums, part of the Mastering Servers category; based on this example on the tutorials Code: $SERVER["socket"] == "192.168.1.2:80" { server.document-root = "/home/lighttpd/theos.in/http" server.errorlog = "/var/log/lighttpd/theos.in/error.log" accesslog.filename = ...


Go Back   nixCraft Linux Forum > Mastering Servers > Web servers

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-14-2007, 05:30 AM
Junior Member
User
 
Join Date: Mar 2007
Posts: 13
Rep Power: 0
muks
Default Lighttpd socket with multiple subdomains or single IP

based on this example on the tutorials

Code:
$SERVER["socket"] == "192.168.1.2:80" {
server.document-root = "/home/lighttpd/theos.in/http"
server.errorlog = "/var/log/lighttpd/theos.in/error.log"
accesslog.filename = "/var/log/lighttpd/theos.in/access.log"
}
which binds theos.in to the IP 192.168.1.2

what if there's a subdomain for theos.in say forums.theos.in with a different server.document-root, server.errorlog, accesslog.filename

How do I do it?

Thanks for your help
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-16-2007, 01:01 AM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 554
Rep Power: 6
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

u can try as follows:

Code:
$SERVER["socket"] == "192.168.1.2:80" { 
$HTTP["host"] == "theos.in" {
 server.document-root = "/home/lighttpd/theos.in/http" 
 server.errorlog = "/var/log/lighttpd/theos.in/error.log" 
 accesslog.filename = "/var/log/lighttpd/theos.in/access.log" 
}

$HTTP["host"] == "forum.theos.in" {
 server.document-root = "/home/lighttpd/forum.theos.in/http" 
 server.errorlog = "/var/log/lighttpd/forum.theos.in/error.log" 
 accesslog.filename = "/var/log/lighttpd/forum.theos.in/access.log" 
}
}

make sure theos.in and forum.theos.in points to 192.168.1.2 or use wild card domain
Code:
* IN A 192.168.12
__________________
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
Reply With Quote
  #3 (permalink)  
Old 03-17-2007, 04:48 AM
Junior Member
User
 
Join Date: Mar 2007
Posts: 13
Rep Power: 0
muks
Default

it worked!

Thank you so much!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
find subdomains in url nvbhole Shell scripting 2 12-22-2007 12:12 PM
single DHCP server with multiple VLAN's frank Computer Networking and Internet/broadband 2 12-07-2007 12:38 PM
How to start SSH in Single User Mode on FreeBSD NeoGreen Getting started tutorials 2 08-12-2007 03:05 AM
Howto boot freebsd single user mode raj All about FreeBSD/OpenBSD/NetBSD 1 12-12-2006 02:40 PM
how to create multiple file in a single command selvam Shell scripting 3 07-26-2006 01:01 AM


All times are GMT +5.5. The time now is 12:28 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36