Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable apache's access log? #1667

Closed
user9931 opened this issue Jan 2, 2022 · 2 comments
Closed

How to disable apache's access log? #1667

user9931 opened this issue Jan 2, 2022 · 2 comments
Labels

Comments

@user9931
Copy link

user9931 commented Jan 2, 2022

Is it possible to disable apache's access log?
so many lines per second like this

app_1    | 192.168.0.2 - - [02/Jan/2022:10:12:40 +0000] "GET /login HTTP/1.1" 200 6862 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36"
app_1    | 192.168.0.2 - - [02/Jan/2022:10:12:40 +0000] "GET /core/img/favicon.ico HTTP/1.1" 200 3809 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36"
app_1    | 127.0.0.1 - - [02/Jan/2022:10:12:47 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.51 (Debian) PHP/8.0.13 (internal dummy connection)"
app_1    | 127.0.0.1 - - [02/Jan/2022:10:12:48 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.51 (Debian) PHP/8.0.13 (internal dummy connection)"
app_1    | 192.168.0.2 - - [02/Jan/2022:10:12:40 +0000] "GET /cron.php HTTP/1.1" 200 931 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36"
app_1    | 127.0.0.1 - - [02/Jan/2022:10:12:57 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.51 (Debian) PHP/8.0.13 (internal dummy connection)"
@J0WI J0WI added the question label Feb 2, 2022
@J0WI
Copy link
Contributor

J0WI commented Feb 2, 2022

This image is based on https://github.com/docker-library/php. You are more likely to find an answer there.

@HenningCash
Copy link

From this issue: docker-library/php#537

There is no explicit setting in Apache's config but the files in /var/log/apache2/* are symlinked to stdout and stderr.
Just delete the symlink(s) or point the access/error log to another file.

lrwxrwxrwx 1 www-data www-data   11 Mar  1 19:20 access.log -> /dev/stdout
lrwxrwxrwx 1 www-data www-data   11 Mar  1 19:20 error.log -> /dev/stderr
lrwxrwxrwx 1 www-data www-data   11 Mar  1 19:20 other_vhosts_access.log -> /dev/stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants