Question

Apache is runnig my server with port 80 and lighttpd with 81.

I defined vhost abc.com in apache. I want to define track.abc.com and all request goes to lighttpd. Is is possible to define track subdomain for abc.com in lighttpd?

Was it helpful?

Solution 2

I research and answer is Apache's ProxyPass option. First I configured my subdomain on Apache's vhost. and I added my subdomain's chost config file

ProxyPass / http://my_host_name:81/ 

Now, all my subdomains request goes to lighttp.

OTHER TIPS

It is possible but rather than ports you need to have 2 separate IP addresses if you want to make regular request http://www.domainname.com in your browser. Otherwise you will be forced to call http://www.domainname.com if you intend to use the same IP address for both Apache and Lighttpd server.

You need to declare listening port in both Apache config and Lighttpd otherwise they both would try to bind IP address and port 80 which will result in error and only first server would start up.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top