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

I made a project here http://www.tryperl.com/ (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/tryperl.com/TryPerlApp/)

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 Safe.pm 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?

  • Why the close votes? This is about my apache config and not about programming. – gideon Jan 12 '13 at 15:58

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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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