Proper IP Address and Hostname on Log
-
Below is a sample log from LAMP app. Notice the IP address, which should have been the remote IP of the user-agent. Also when the app is configured to have multiple hostnames (aliases), there's no way to distinguish which service received the request. Please fix this. Thanks!
May 10 23:22:23 172.18.0.1 - - [10/May/2021:17:37:23 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" May 10 23:22:25 172.18.0.1 - - [10/May/2021:17:37:25 +0000] "GET /path-redacted" HTTP/1.1" 301 532 "-" "Mozilla (CloudronHealth)" May 10 23:22:26 172.18.0.1 - - [10/May/2021:17:37:26 +0000] "GET /path-redacted" HTTP/1.1" 301 65332 "-" "User-Agent redacted" May 10 23:22:26 172.18.0.1 - - [10/May/2021:17:37:26 +0000] "GET /path-redacted" HTTP/1.1" 301 5932 "-" "User-Agent redacted" May 10 23:22:26 172.18.0.1 - - [10/May/2021:17:37:26 +0000] "GET /path-redacted" HTTP/1.1" 301 7532 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 5032 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 2532 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 532 "-" "Mozilla (CloudronHealth)" May 10 23:22:30 172.18.0.1 - - [10/May/2021:17:37:30 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" May 10 23:22:41 172.18.0.1 - - [10/May/2021:17:37:41 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" -
Below is a sample log from LAMP app. Notice the IP address, which should have been the remote IP of the user-agent. Also when the app is configured to have multiple hostnames (aliases), there's no way to distinguish which service received the request. Please fix this. Thanks!
May 10 23:22:23 172.18.0.1 - - [10/May/2021:17:37:23 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" May 10 23:22:25 172.18.0.1 - - [10/May/2021:17:37:25 +0000] "GET /path-redacted" HTTP/1.1" 301 532 "-" "Mozilla (CloudronHealth)" May 10 23:22:26 172.18.0.1 - - [10/May/2021:17:37:26 +0000] "GET /path-redacted" HTTP/1.1" 301 65332 "-" "User-Agent redacted" May 10 23:22:26 172.18.0.1 - - [10/May/2021:17:37:26 +0000] "GET /path-redacted" HTTP/1.1" 301 5932 "-" "User-Agent redacted" May 10 23:22:26 172.18.0.1 - - [10/May/2021:17:37:26 +0000] "GET /path-redacted" HTTP/1.1" 301 7532 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 5032 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 2532 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 532 "-" "Mozilla (CloudronHealth)" May 10 23:22:30 172.18.0.1 - - [10/May/2021:17:37:30 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" May 10 23:22:41 172.18.0.1 - - [10/May/2021:17:37:41 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" -
Below is a sample log from LAMP app. Notice the IP address, which should have been the remote IP of the user-agent. Also when the app is configured to have multiple hostnames (aliases), there's no way to distinguish which service received the request. Please fix this. Thanks!
May 10 23:22:23 172.18.0.1 - - [10/May/2021:17:37:23 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" May 10 23:22:25 172.18.0.1 - - [10/May/2021:17:37:25 +0000] "GET /path-redacted" HTTP/1.1" 301 532 "-" "Mozilla (CloudronHealth)" May 10 23:22:26 172.18.0.1 - - [10/May/2021:17:37:26 +0000] "GET /path-redacted" HTTP/1.1" 301 65332 "-" "User-Agent redacted" May 10 23:22:26 172.18.0.1 - - [10/May/2021:17:37:26 +0000] "GET /path-redacted" HTTP/1.1" 301 5932 "-" "User-Agent redacted" May 10 23:22:26 172.18.0.1 - - [10/May/2021:17:37:26 +0000] "GET /path-redacted" HTTP/1.1" 301 7532 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 5032 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 2532 "-" "User-Agent redacted" May 10 23:22:28 172.18.0.1 - - [10/May/2021:17:37:28 +0000] "GET /path-redacted" HTTP/1.1" 301 532 "-" "Mozilla (CloudronHealth)" May 10 23:22:30 172.18.0.1 - - [10/May/2021:17:37:30 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted" May 10 23:22:41 172.18.0.1 - - [10/May/2021:17:37:41 +0000] "GET /path-redacted" HTTP/1.1" 301 1532 "-" "User-Agent redacted"@nj I have fixed this in the new package. However, it will work only for new installation. For existing install, you have to edit
/app/data/apache/app.confand add the following lines (You can add it after theDocumentRoot /app/data/publicline):LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy CustomLog "|/bin/cat" proxy ErrorLog "|/bin/cat"After that restart the app.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login