Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Note: This question is about my server configuration giving 504 timeouts.

I made a project here (requires auth with GitHub to sign in). Please be kind, I'm working on to learn Lamp(erl)

I used a

  • Micro Instance (w/ free tier) Amazon EC2 server
  • Amazon Linux, perl.
  • I used the Dancer framework
  • CGI configuration to host it.
  • I have a virtual host conf in apache (with a sites-enabled folder and the conf file, and my site sits under /srv/www/

If you haven't guessed, it's a rudimentary IDE, you can write some basic perl script with print commands and run it and see the output. I'm using the module currently.

The Problem:

It usually takes forever to load. There are a number of JS files, half of which result in a 504. The site barely loads on the first go. Here is what firebug sees:

TryPerl Net on Firefox.

I'm a total linux/apache newbie here. What am I doing wrong? My config with mod_perl earlier behaved way better, so I'm sure it's not my server.

Is it the CGI configuration? Should I used nginx on the front for static files? Can I do that with my configuration?

share|improve this question
Why the close votes? This is about my apache config and not about programming. – gideon Jan 12 '13 at 15:58
up vote 0 down vote accepted

So I managed to get everything running pretty beautifully after installing nginx.

Seems like Dancer/Apache/CGI is just no good for serving static files.

This article is about configuring nginx it on debian, which gives some config clues. But, since I was on Amazon Linux which is Red Hat this article helped me out. (You use $releasever as 6 when following the article)

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.