0

I am facing a challenge with my current project.We have it on an ec2 instance and we have a dev and a production server.Now the challenge is,whenever a team member encounters an error on the server I have to connect to the server using SSH(putty) and go to the logs folder and open the logs files using

   tail -f path/to/the/file

Now I want to have the logs easily accessible to the entire team,and would like to display them at an URL like www.mydomain.com/logs/apache or /mysql,so that there is no need of SSH every time. I do not want the SSH keys distributed between multiple people as it can be a security concern and hence cannot share production details with all.
Also,making a SSH connection each time is time consuming.I am not a proficient linux/unix developer and like to seek help to understand if I can achieve this by any mean.Either by using a command or a shell script which writes the details of the logs to a file which is accessible over http.

Thank you

1
  • Looking forward for suggestions if what I am trying is possible?
    – KillABug
    Dec 2, 2014 at 14:13

1 Answer 1

1

In the past I've created symbolic links to /var/log/ areas so that Apache will serve the files. EG:

# ln -s /var/log /var/www/logs

You probably should consider some form of security on this logs folder, especially if publicly visible.

2
  • Yes if I have to display it in the browser I will restrict it using .htaccess file.
    – KillABug
    Dec 2, 2014 at 4:38
  • I am looking forward to output the logs on the browser!
    – KillABug
    Dec 2, 2014 at 5:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .