Getting Apache logs: Difference between revisions

From ULYSSIS documentation
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
You can find all your apache logs (like the access.log and error.log) on all of our servers in the directory: /var/log/apache_user/''username''
You can find all your Apache logs (like <code>access.log</code> and <code>error.log</code>) on all of our shell servers in the directory <code>/var/log/apache_user/''username''</code>. For more information on how to access your files, please visit [[Accessing your files]].


So if your username is ''foobar'' then you can easily access your logs this way:
==Using Cyberduck (graphical interface)==
  foobar@zap:~$ cd /var/log/apache_user/foobar
 
You can access the log files using an SFTP client like Cyberduck. After logging in to one of our shell servers as per [[Accessing your files]], click on "Go" on the top bar and then click "Go to Folder...":
 
[[File:Getting Apache Logs - Cyberduck 1.png]]
 
Then enter <code>/var/log/apache_user/''username''</code> as path name (replace ''username'' with your own username):
 
[[File:Getting Apache Logs - Cyberduck 2.png]]
 
After pressing "Go", you will see a directory for each of your websites, containing their Apache logs.
 
[[File:Getting Apache Logs - Cyberduck 3.png]]
 
You can view a log file by selecting it and pressing the "Edit" button.
 
[[File:Getting Apache Logs - Cyberduck Edit button.png]]
 
After a few days, logs will be compressed into a <code>bz2</code> file. You can download such a file and open it with [https://www.7-zip.org/ 7-Zip].
 
==Using the command line==
 
You can also access your logs by [[Accessing shell servers over SSH|logging in to one of our shell servers over SSH]] and navigating to the correct directory:
  username@ssh1:~$ cd /var/log/apache_user/username
   
   
  foobar@zap:/var/log/apache_user/foobar$ ls
  username@ssh1:/var/log/apache_user/username$ ls
  foobar.ulyssis.be
  username.ulyssis.be
   
   
  foobar@zap:/var/log/apache_user/foobar$ cd foobar.ulyssis.be
  username@ssh1:/var/log/apache_user/username$ cd username.ulyssis.be
   
   
  foobar@zap:/var/log/apache_user/foobar/foobar.ulyssis.be$ ls
  username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ ls
  access-2014-05-07.log error-2014-05-07.log
  access-2014-05-07.log error-2014-05-07.log
   
   
  foobar@zap:/var/log/apache_user/foobar/foobar.ulyssis.be$ tail error-2014-05-07.log  
  username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ tail error-2014-05-07.log  
  [Wed May 07 01:27:14 2014] [error] [client 10.0.0.1] File does not exist: /home/user/foobar/www/favicon.ico
  [Wed May 07 01:27:14 2014] [error] [client 10.0.0.1] File does not exist: /home/user/username/www/favicon.ico
 
If you can't find your username inside of <code>/var/log/apache_user</code>, don't worry. If you enter it with <code>cd foobar</code>, it will automatically appear.
 
==With FileZilla==


You can also access the log files with an SFTP client, like FileZilla. Just enter
If you can't find your username inside of <code>/var/log/apache_user</code>, don't worry. If you enter it with <code>cd username</code>, it will automatically appear.
<tt>/var/log/apache_user/''username''</tt> (replace ''username'' with your username) on the right hand side, where it says
"Remote site", and press <tt>Enter</tt>:


[[File:Logs.png]]
[[Category:Webserver]]

Latest revision as of 14:40, 9 October 2021

You can find all your Apache logs (like access.log and error.log) on all of our shell servers in the directory /var/log/apache_user/username. For more information on how to access your files, please visit Accessing your files.

Using Cyberduck (graphical interface)

You can access the log files using an SFTP client like Cyberduck. After logging in to one of our shell servers as per Accessing your files, click on "Go" on the top bar and then click "Go to Folder...":

Getting Apache Logs - Cyberduck 1.png

Then enter /var/log/apache_user/username as path name (replace username with your own username):

Getting Apache Logs - Cyberduck 2.png

After pressing "Go", you will see a directory for each of your websites, containing their Apache logs.

Getting Apache Logs - Cyberduck 3.png

You can view a log file by selecting it and pressing the "Edit" button.

Getting Apache Logs - Cyberduck Edit button.png

After a few days, logs will be compressed into a bz2 file. You can download such a file and open it with 7-Zip.

Using the command line

You can also access your logs by logging in to one of our shell servers over SSH and navigating to the correct directory:

username@ssh1:~$ cd /var/log/apache_user/username

username@ssh1:/var/log/apache_user/username$ ls
username.ulyssis.be

username@ssh1:/var/log/apache_user/username$ cd username.ulyssis.be

username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ ls
access-2014-05-07.log error-2014-05-07.log

username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ tail error-2014-05-07.log 
[Wed May 07 01:27:14 2014] [error] [client 10.0.0.1] File does not exist: /home/user/username/www/favicon.ico

If you can't find your username inside of /var/log/apache_user, don't worry. If you enter it with cd username, it will automatically appear.