Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an apache server on a linux ubuntu server. I would like to configure a lighttpd server to serve all the static content.

share|improve this question

migrated from superuser.com Feb 22 '10 at 15:36

This question came from our site for computer enthusiasts and power users.

1 Answer 1

up vote 0 down vote accepted

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)

  • www.somesite.com -> apache server ip
  • css.somesite.com -> lighttpd server ip
  • js.somesite.com -> lighttpd server ip
  • images.somesite.com -> lighttpd ip server
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.