logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Unable to setup rotatelogs in apache in Azure environment
Author
lofej



Joined: 29 Mar 2024
Posts: 2
Location: RO, Székelyudvarhely

PostPosted: Sun 31 Mar '24 13:42    Post subject: Unable to setup rotatelogs in apache in Azure environment Reply with quote

Hi!
I have the following situation, i have a php project containerized with apache 2.4, trying to setup rotatelogs, I want access logs for each day separated.
When I test locally it works without problem, but when I deploy it to Azures App Service it wont work, apache creates the log file, exactly how I named it with the date (ex. log_2024_03_31.log) but stays 0 byte, the default access.log gets updated.

Is this something Azure done to use their own log manager system? (Log Analytics Workspace) for which I have to pay, not a problem, I just spent many hours trying to troubleshoot the problem:)

Thanks!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Wed 03 Apr '24 11:43    Post subject: Reply with quote

Please post the relevant part of your config what you tried.
Back to top
lofej



Joined: 29 Mar 2024
Posts: 2
Location: RO, Székelyudvarhely

PostPosted: Thu 04 Apr '24 12:12    Post subject: Reply with quote

Sure, here is a snippet from the apache conf. file:

Code:
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" custom
CustomLog "|/usr/bin/rotatelogs -l /var/log/apache2/lat_%Y_%m_%d.log 86400" custom


I leaning towards a permission issue, its just not clear to me how that works, the container has root permissions(def.), apache has www-data set as user/group. When setup on Azure the logsfiles are created under nouser/nogroup, unable to set any different from the container as root.
Back to top


Reply to topic   Topic: Unable to setup rotatelogs in apache in Azure environment View previous topic :: View next topic
Post new topic   Forum Index -> Apache