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.

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?

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

1 Answer 1

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

 
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.