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

Simplifying configs #84

Merged
merged 3 commits into from
Aug 3, 2018
Merged

Conversation

lutaylor
Copy link
Contributor

@lutaylor lutaylor commented Aug 2, 2018

Great job! This works as advertised!

I had a few ideas to simplify things.

Apache configs for 2.2/2.4 should be the same across OS types. Seem to work just fine using:

e.g.
Include custom.d/whitelist-domains.conf
vs
Include /etc/apache2/custom.d/whitelist-domains.conf

I stripped out all the extra files and made it so you should only have to maintain the configs for 2.2 and 2.4 after updating the includes. I tested on CentOS 6/7 and Ubuntu 14.04 it seems to work as expected.

I made updates to install-apacheblocker.sh and update-apacheblocker.sh so that they should work with either OS / Apache version provided the variables are updated accordingly.

In addition, update-apacheblocker will only reload apache if the configs change and if the "configtest" passes. It sends an email if an update or an error takes place.

…or each OS. Updated install and updater scripts as well.
@mitchellkrogza
Copy link
Owner

Thanks @lutaylor I'll look into this commit later today, some changes need to be made in the templates otherwise they won't reflect when Travis builds.

@mitchellkrogza
Copy link
Owner

@lutaylor We have some conflicts, I have introduced a commit to reflect the changes to the install & update scripts. I then need to first make some mods to the generator scripts to stop creating the other_distro's sections before we can remove them. So let me do that first.

@lutaylor
Copy link
Contributor Author

lutaylor commented Aug 3, 2018

@mitchellkrogza

I see that now, I missed that. I am not completely sure about the changes needed to the Travis stuff.

Was going to try a find and replace of instances of the full path include but it seems more involved than that. Looks like some of it could be removed. Let me know what you think.

@lutaylor
Copy link
Contributor Author

lutaylor commented Aug 3, 2018

Great I will wait for you before trying to make any further changes. If it is easier you could put a PR against my PR as well.

mitchellkrogza added a commit that referenced this pull request Aug 3, 2018
- Required before we can deprecate those folders.
REF: #84 @lutaylor
mitchellkrogza added a commit that referenced this pull request Aug 3, 2018
mitchellkrogza added a commit that referenced this pull request Aug 3, 2018
…e Scripts

- Single update script now in root of repo from @lutaylor
2 - Rename _other_distros > _CPanel_Instructions
- REF: #84
@mitchellkrogza
Copy link
Owner

Okay @lutaylor seems my changes are now up to speed with this PR. Current Travis build must finish before I can merge and test this.

@mitchellkrogza mitchellkrogza merged commit 2e81966 into mitchellkrogza:master Aug 3, 2018
@lutaylor
Copy link
Contributor Author

lutaylor commented Aug 3, 2018

@mitchellkrogza Great thanks!

@mitchellkrogza
Copy link
Owner

@lutaylor seems to have now merged nicely. Now ..... hopefully you can help with my next headache, the Apache 2.4 Testing in TravisCI - See https://travis-ci.org/mitchellkrogza/apache-ultimate-bad-bot-blocker/builds/411767128#L1323-L1344

We've had issues for some time now regarding the way the blocker include is configured on 2.4, you can look through past issues on this. Gave me too many headaches so I made the tests not cause a build failure but ultimately they should pass those tests to confirm it's working 100% as it should be. I gave up on trying to fix this issue because I wasn't sure if I was banding my head against TravisCI container problems (a regular headache with Travis) or a truly incorrect configuration of the blocker for 2.4.

@mitchellkrogza
Copy link
Owner

Looks now like the repo has been through a double wash, triple rinse and spin and dry cycle this afternoon 😂

@mitchellkrogza
Copy link
Owner

@lutaylor New Update script passed with flying colors on my server 👍
capture

@lutaylor
Copy link
Contributor Author

lutaylor commented Aug 3, 2018

@mitchellkrogza
Have you tried moving the include after the options https://github.com/mitchellkrogza/apache-ultimate-bad-bot-blocker/blob/master/.dev-tools/_conf_files_2.4/default.conf and putting in a Require all denied?

@mitchellkrogza
Copy link
Owner

Let me try that in the morning, I made some other changes now which did not work. Unless you want to send a quick PR on that as I'm AFK for now.

@lutaylor
Copy link
Contributor Author

lutaylor commented Aug 3, 2018

Tried adding #86 but it still seems to fail. Seems to be using a different set of configs?

@mitchellkrogza
Copy link
Owner

I'll check through those configs this morning and try iron this out. Weird it works on any VM and live server I've tested it on but not inside Travis hence #headaches

mitchellkrogza added a commit that referenced this pull request Aug 6, 2018
Update README Instructions
@mitchellkrogza
Copy link
Owner

@lutaylor when you have some time, please can you add an option to updateapacheblocker.sh

# Backup Previous globalblacklist.conf eg. TRUE or FALSE
MAKE_BACKUP=FALSE

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