0

I googled around and could not find a solution. I am not sure If I am using the correct terminology.

I am using lighttpd (1.4.33) and would like to go to the url http://support.example.com and have it display the content of example.com/support

I am thinking this is a reverse proxy. Any help is appreciated.

Jmaes
  • 1

3 Answers3

2

If everything is on the same server, you must setup a subdomain:

Eg:

###### Subdomain settings ##############
$HTTP["host"]  == "support.example.com"{
        server.document-root = "/home/lighttpd/support.example.com/http"
        accesslog.filename   = "/var/log/lighttpd/support.example.com/access.log"
}

ref: http://www.cyberciti.biz/faq/linux-unix-setup-adding-subdomain-with-lighttpd-webserver/

Federico Sierra
  • 3,499
  • 1
  • 18
  • 24
0

nginx have "proxy_pass" to do such things but no idea about lighttpd. anyway you can map the document root to subdomain if everything is on the same server. I'm posting nginx "proxy_pass" doc here, hope it'll help :)

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass

0

Why can't you just use a subdomain with the document root of the folder?

$HTTP["host"] =~ "^support.example.com$" {
    server.document-root = "/var/www/support/"
}
allo
  • 1,524
  • 1
  • 19
  • 35