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

Feature Request: Add error.log and access.log to Nginx #156

Open
digitalbirth opened this issue Jan 15, 2024 · 1 comment
Open

Feature Request: Add error.log and access.log to Nginx #156

digitalbirth opened this issue Jan 15, 2024 · 1 comment

Comments

@digitalbirth
Copy link

To help assist others in troubleshooting their installations, it may help to make it easy to enable logging for the nginx server.

It should be commented out by default so the logs don't grow in size, but should be an easy option to enable if required.

nginx.conf

Add lines:
" #access_log /var/log/nginx/access.log;
#error_log /var/log/nginx/error.log warn; "

server {
   listen 80;
   listen [::]:80;
   server_name _;

   client_max_body_size 4G;

  # Logs - uncomment to enable location:/mergin/logs
  # If enabled be aware of disk space used by the logs.
   #access_log /var/log/nginx/access.log;
   #error_log /var/log/nginx/error.log warn;

docker-compose.yml

add line:
" - ./logs:/var/log/nginx/"

proxy:
    image: nginx
    container_name: merginmaps-proxy
    restart: always
    ports:
      - "8080:80"
    volumes:
      - ./projects:/data  # map data dir to host
      - ./nginx.conf:/etc/nginx/conf.d/default.conf
      - ./logs:/var/log/nginx/  # map logs dir to host
@MarcelGeo
Copy link
Contributor

@digitalbirth feel free to open PR to this enhancement

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

No branches or pull requests

2 participants