Last active
September 23, 2024 05:37
-
-
Save muhammadardie/2f0e50a8b45c7fed4c698507eb880c2a to your computer and use it in GitHub Desktop.
GoAccess Docker Compose & Nginx configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
goaccess: | |
container_name: goaccess | |
image: allinurl/goaccess:latest | |
volumes: | |
- "/var/log/nginx:/var/log/nginx:ro" | |
- "/var/www/goaccess:/var/www/goaccess:rw" | |
ports: | |
- "7890:7890" | |
command: "/var/log/nginx/access.log --log-format=COMBINED -o /var/www/goaccess/index.html --real-time-html --tz=Asia/Jakarta --ws-url=wss://subdomain.example.com:443/wss --port=7890" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name subdomain.example.com; | |
# Redirect all HTTP requests to HTTPS | |
return 301 https://subdomain.example.com$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name subdomain.example.com; | |
root /var/www/html/dist; | |
# SSL Configuration | |
ssl_certificate /etc/letsencrypt/live/subdomain.example.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/subdomain.example.com/privkey.pem; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment