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

Is the best way to get all my EC2 Web Server Instance Apache Logs in one place, to create a "LogServer" EC2 Micro instance and point all the Apache Configs to it? Not sure how to do this and wondering if anyone can offer help on doing this. Do I need to do this via Syslog?

share|improve this question
The fact that you're running on EC2 doesn't really play into things here. You'd implement central logging the same way on EC2 as you would if you were running your own physical servers. – EEAA Jan 31 '13 at 22:29

You can do this via syslog and having a log server sounds fine to me. For how to do this I would suggest reading around as this is a very common issue, you can start here: Apache remote loggin

share|improve this answer
That is the one article I've already read. For someone with no prior Syslog or Apache.log experience...other suggestions? – Zhenya Jan 31 '13 at 23:44

You can use syslog if you wish to roll your own, one way is to exploit the pipe, like this

CustomLog "| /usr/sbin/rotatelogs /var/log/httpd/access_log.%Y-%m-%d-%H_%M_%S 86400"

In this example, apache access log is being piped to a file through rotatelogs utility (see the '|' at the beginning). You can replace it with your own script that streams the log to where ever you like.

share|improve this answer
Thanks for the example. We are thinking we need the logs to write directly, line by real time because of autoscaling on AWS...we could be taking down and bringing up web servers at any moment. – Zhenya Feb 1 '13 at 15:22

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.