mirror of
https://github.com/maciejpedzich/maciejpedzi.ch.git
synced 2024-11-27 15:45:47 +01:00
Add a custom HTTPD config to log X-Forwarded-For IP
This commit is contained in:
parent
6ef1e30039
commit
6e1d3e864c
@ -5,5 +5,6 @@ RUN npm i
|
||||
RUN npm run build
|
||||
|
||||
FROM httpd:2.4-alpine AS runtime
|
||||
COPY --from=build httpd.conf /usr/local/apache2/conf/httpd.conf
|
||||
COPY --from=build /app/dist /usr/local/apache2/htdocs/
|
||||
EXPOSE 80
|
||||
|
6
httpd.conf
Normal file
6
httpd.conf
Normal file
@ -0,0 +1,6 @@
|
||||
# Fields to record - use X-Forward-For instead of client IP so that we get the actual clients IP
|
||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" mycustom
|
||||
|
||||
# Log locations
|
||||
CustomLog "/var/log/httpd/access.log" mycustom env=!dontlog
|
||||
ErrorLog "/var/log/httpd/error.log"
|
Loading…
Reference in New Issue
Block a user