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

Issue 112: NGINX bot blocker #113

Merged
merged 5 commits into from
Sep 19, 2023
Merged

Issue 112: NGINX bot blocker #113

merged 5 commits into from
Sep 19, 2023

Conversation

aksm
Copy link
Contributor

@aksm aksm commented Jun 29, 2023

Resolves #112.

Steps for basic deployment (to be documented more thoroughly):

  1. Uncomment variables starting MSMTP_ and NGXBLOCKER_ (start with both disabled, but fill in other appropriate variables.
  2. docker-compose down && docker-compose pull && docker compose up -d.
  3. Run install and setup scripts:
    1. docker exec -ti esmero-web bash -c "/usr/local/sbin/install-ngxblocker"
    2. Check output to make sure changes look ok.
    3. docker exec -ti esmero-web bash -c "/usr/local/sbin/install-ngxblocker -x"
    4. docker exec -ti esmero-web bash -c "/usr/local/sbin/setup-ngxblocker -v /etc/nginx/templates -e .copy"
    5. Check output to make sure changes look ok.
    6. docker exec -ti esmero-web bash -c "/usr/local/sbin/setup-ngxblocker -v /etc/nginx/templates -e .copy -x"
    7. Enable variables (if MSMTP_EMAIL is blank, email sending will be skipped):
      NGXBLOCKER_CRON_START=true
      NGXBLOCKER_ENABLE=true
    8. docker compose down && docker compose up -d
    9. docker exec -ti esmero-web bash -c "/docker-entrypoint.d/20-envsubst-on-templates.sh"
    10. docker exec -ti esmero-web bash -c "nginx -t"
    11. If output from above is:
      nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
      nginx: configuration file /etc/nginx/nginx.conf test is successful
      
      Run the following: docker exec -ti esmero-web bash -c "nginx -s reload"
    12. See Testing section ("Step 10") here: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker

@aksm aksm marked this pull request as ready for review July 14, 2023 19:28
Copy link
Member

@DiegoPino DiegoPino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested in production

@DiegoPino DiegoPino merged commit 26d4a2d into esmero:1.1.0 Sep 19, 2023
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

Successfully merging this pull request may close these issues.

2 participants