nixCraft Linux Forum

nixCraft

Linux / UNIX 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

Linux answers from nixCraft.


Web servers Discussion on Apache, Nginx and Lighttpd HTTP/web server and configuration issues.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 14-03-2007, 05:30 AM
Junior Member
User
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
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
  #2 (permalink)  
Old 16-03-2007, 01:01 AM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 708
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
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.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
  #3 (permalink)  
Old 17-03-2007, 04:48 AM
Junior Member
User
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
muks
Default

it worked!

Thank you so much!
Reply With Quote
Reply


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 Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
find subdomains in url nvbhole Shell scripting 2 22-12-2007 12:12 PM
single DHCP server with multiple VLAN's frank Computer Networking and Internet/broadband 2 07-12-2007 12:38 PM
How to start SSH in Single User Mode on FreeBSD NeoGreen Getting started tutorials 2 12-08-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 26-07-2006 01:01 AM


All times are GMT +5.5. The time now is 10:32 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

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 37 38