Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I have 2 IP Addresses, and running apache on ipaddress #1 ( What I was thinking, was pointing to ipaddress #2, and running lighthttpd for images and javascript.

Does this sound normal? I want to make sure my images and javascript are served quickly and cookieless.

share|improve this question
up vote 1 down vote accepted

More or less, there's a big enough mix of options that everyone does it differently, but your example would work. "Normally" people put lighthttpd (or nginx more nowadays) in front of apache and have it proxy requests, but your setup is actually simpler if you have the second IP available.

The only thing I'd mention is you might want to make your into a fully separate domain from Unless you're really disciplined about your cookies, some plugin or third party vendor code or who knows what is going to set * cookies and then browsers will wind up sending them to your static setup. If you go with you're immune.

share|improve this answer
Ok, seems perfect to me. I was trying to use the same name, but I think I will have a problem with it, so I will try two complete different domain names. – Mike Curry Feb 10 '10 at 1:09

If you use a diffferent domain name, or a subdomain, and (assuming barebones) no php / no session_autostart, there should be no cookies. It's pretty much Best-Current-Practice of the major sites (and even small ones), and works well.

I'm assuming you're looking to speed up your site -- the first, and most effective way (short of using a CDN) would be to have a subdomain or separate domain for your images. It doubles the pipelining bucket (since pipelines are per-FQDN). A great help.

Last, turn OFF compression on your image server; unless it's serving out pdfs or bloaty raw-files, you take a CPU hit and gain no bandwidth speed over trying to compress an already-highly-optimized file.

Hope this helps!

share|improve this answer

Your Answer


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.