Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to properly configure Apache server that way I can view Apache log files in browser? Using Ubuntu and log files reside in /var/log/apache2/access.log which is outside DocumentRoot /var/www.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You can always symlink in directories from outside the web root, or use an "Alias" (even better) in the configuration to point to a specific directory outside the web root.

The logs are only readable by root and the adm group as default, which is a security measure. To begin with, you'd have to give the Apache user read permission to the logs to be able to serve it via http. This can be done in a couple of more or less bad ways. I'd recommend to actually not have the logs readable over http, but if you really want to do it, know that it is considered a security risk to give e.g. the Apache user write permissions to the log folder.

share|improve this answer

As @DanielAndersson noted in his answer, the logs are only readable by root, so accessing via the web might not be a good idea. But if you have ssh access to the system, you can login and simply tail the log file.

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.