Knowledgebase
Portal Home > Knowledgebase > Articles Database > How to have multiple domains with 1 site on lighthttpd
How to have multiple domains with 1 site on lighthttpd
Posted by loyaler, 11-04-2008, 05:13 AM How to have multiple domains with 1 site on lighthttpd How to have multiple domains with 1 site on lighthttpd Its simple 2 domains and 1 forum. The links should work as 2 individual sites. eg:www.site.com/forum/rules.phpwww.site2.com/forum/rules.php The main site would be site where the site2 will be the additional site shadowing site I need the code for lighthttpd
Posted by hosting_we3cares, 11-04-2008, 08:13 PM Hi, First make sure that mod_simple_vhost is uncommented under the variable server.modules in lighttpd.conf. vi /etc/lighttpd/lighttpd.conf Add the following codes: $HTTP["host"] =~ "(^|\.)site\.com$" { server.document-root = "/home/lighttpd/site.com/http" server.errorlog = "/var/log/lighttpd/site/error.log" accesslog.filename = "/var/log/lighttpd/site/access.log" server.error-handler-404 = "/e404.php" } $HTTP["host"] =~ "(^|\.)site2\.in$" { server.document-root = "/home/lighttpd/site2.com/http" server.errorlog = "/var/log/lighttpd/site2/error.log" accesslog.filename = "/var/log/lighttpd/site2/access.log" server.error-handler-404 = "/e404.php" } /etc/init.d/lighttpd restart __________________ James we3cares. sales@we3cares.com, AIM - jameswe3cares Gtalk - james.we3cares@gmail.com
Add to Favourites Print this Article
Also Read