Linux / UNIX Tech Support Forum
This is a discussion on Lighttpd Subdomain Configuration within the Web servers forums, part of the Mastering Servers category; Hello everybody ! I wanna add a subdomain to my website and point it in a directory example mywebsite.com files.website.com ...
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 |
|
|||
|
Hello everybody !
I wanna add a subdomain to my website and point it in a directory example mywebsite.com files.website.com < how to do this in lighttpd and dns configuration ? I have this now in my lighttpd configuration file : Code:
$HTTP["host"] =~ "(^|\.)website\.com$" |
|
||||
|
Do you have DNS configured properly to point to lighttpd IP? If so use it as follows:
Code:
$HTTP["host"] == "files.website.com"{
server.document-root = "/path/to/files.website.com/http"
accesslog.filename = "/var/log/lighttpd/files.website.com/access.log"
}
__________________
Vivek Gite |
|
|||
|
Thanks for your reply nixcraft !
The DNS are OK i have configured Code:
files.website.com IP A ( ADRESS ) but when i type in my navigator the adress files.website.com , i'm redirected into my forum ! please be aware that i use vbseo + vbulletin like you there , this my lighttpd.conf Code:
##VHOST
$HTTP["host"] =~ "(^|\.)site\.com$" {
server.document-root = "/home/site.com/public_html"
server.errorlog = "/home/lighttpd/site.com/error.log"
accesslog.filename = "/home/lighttpd/site.com/access.log"
url.rewrite-once = (
"^/forum/(sitemap.*\.(xml|txt)(\.gz)?)$" => "/forum/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1",
"^(/forum/(admincp|modcp|clientscript|cpstyles|images|customavatars|styles|smiley)/.*)$" => "$1",
"^(/site\.ico|/robots\.txt|.*clear\.gif)$" => "$1",
"^/forum/(.+)\?(.*)$" => "/forum/vbseo.php?$2",
"^/forum/(.+)$" => "/forum/vbseo.php",
)
$HTTP["host"] == "files.site.com"{
server.document-root = "/home/site.com/public_html/files"
}
}
|
|
||||
|
For files.site.com set server.document-root outside original /home/site.com/public_html i.e. set it as follows:
Code:
server.document-root = "/home/files.site.com/public_html"
__________________
Vivek Gite |
|
|||
|
Quote:
http://website.com/forum |
![]() |
|
|
| Tags |
| lighttpd, lighttpd subdomin configuration, lighttpd.conf, web servers |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Lighttpd Vbullenti VB SEO Configuration | arbdoor | Web servers | 5 | 1st May 2009 12:39 AM |
| MX record for a subdomain | h@foorsa.biz | Domain Name Server | 1 | 17th September 2008 03:22 AM |
| Lighttpd Subdomain Problem | Mental Lexicon | Web servers | 2 | 24th July 2008 06:13 PM |
| Php lighttpd mysql setup and configuration for RHEL 5 | raj | Web servers | 1 | 30th July 2007 12:50 AM |
| lighttpd domain and subdomain settings | muks | Web servers | 4 | 8th March 2007 06:39 PM |