I have an apache server on a linux ubuntu server. I would like to configure a lighttpd server to serve all the static content.
migrated from superuser.com Feb 22 '10 at 15:36
This question came from our site for computer enthusiasts and power users.
This is a very common setup. You'll find many advanced guides through a google search.
But the brief answer to this is both coding related and server configuration related. You'll need to set up lightthd to serve up requests in a similar fashion as the apache server. Then you'll need to set your code to query your images/js/css from the lighttpd server rather than the apache server.
So the apache server responds to www.somesite.com and within the source of the webpage requests will go to css.somesite.com, js.somesite.com and images.somesite.com. Set up DNS to point those three subdomains to your lighttpd server.
Your DNS entries should do this (Use A records)