2
This week I installed a simple Ubuntu 14.04 server on which I host a new website (which I built with Flask). The website works fine without any problems.
I now wanted to check out the access log, in which I expect every request which is made to be recorded. So I do a tail -f /var/log/apache2/access.log
which currently shows this (x-ed away my own ip-address):
212.xx.xx.xx - - [08/Jul/2015:18:42:05 +0000] "GET / HTTP/1.1" 200 3594 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
212.xx.xx.xx - - [08/Jul/2015:18:42:05 +0000] "GET /icons/ubuntu-logo.png HTTP/1.1" 200 3688 "http://52.28.183.18/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
212.xx.xx.xx - - [08/Jul/2015:18:42:06 +0000] "GET /favicon.ico HTTP/1.1" 404 501 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
212.xx.xx.xx - - [08/Jul/2015:18:42:06 +0000] "GET /favicon.ico HTTP/1.1" 404 501 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
This seems to be the request I made two days ago (when I installed the server) which opened up the Apache Ubuntu default welcome page. The problem is that I don't see any new requests recorded. Could it be that these are recorded somewhere else because the website works through mod_wsgi?
All tips are welcome!
[EDIT]
My website config looks like this:
<VirtualHost *:80>
WSGIDaemonProcess mywebsite
WSGIScriptAlias / /var/www/mywebsite/app.wsgi
<Directory /var/www/mywebsite>
WSGIProcessGroup mywebsite
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
How is your Apache site configuration set up? Do you have a
CustomLog
directive in there? – bertieb – 2015-07-10T10:22:13.967@bertieb - No, nothing special in that. I used the most simple setup I could find on the internet. I'll add it to the question in a second. – kramer65 – 2015-07-10T12:23:24.520
I think you might be right in your supposition about something else handling access logs, per this mailing list message. It is possible to make flask handle them though: 1 2
– bertieb – 2015-07-10T15:37:49.750