mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-03 19:20:16 +00:00
[TESTS] ADD ansible.vhost setup-ngxblocker test REF: #285
This commit is contained in:
parent
9af2f2eab6
commit
1a02e344b5
2 changed files with 57 additions and 0 deletions
51
.dev-tools/setup-ngxblocker/vhost-cases/ansible.vhost
Normal file
51
.dev-tools/setup-ngxblocker/vhost-cases/ansible.vhost
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
server_name xxxx;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
server_name xxxxx
|
||||||
|
root {{ vhost_www_directory }}/sites/public;
|
||||||
|
|
||||||
|
include {{ nginx_blockbots_cfg_path }};
|
||||||
|
|
||||||
|
ssl_certificate {{ full_certificates_path }}/fullchain.cer;
|
||||||
|
ssl_certificate_key {{ full_certificates_path }}/{{ domain_to_protect }}.key;
|
||||||
|
|
||||||
|
include {{ nginx_yprox_shared_fo_location_path }};
|
||||||
|
include {{ nginx_yprox_conf_fo_logs_path }};
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
root {{ vhost_www_directory }}/admin/public;
|
||||||
|
server_name admin.{{ domain_to_protect }};
|
||||||
|
|
||||||
|
include {{ nginx_yprox_security_path }};
|
||||||
|
include {{ nginx_yprox_ssl_path }};
|
||||||
|
|
||||||
|
ssl_certificate {{ full_certificates_path }}/fullchain.cer;
|
||||||
|
ssl_certificate_key {{ full_certificates_path }}/{{ domain_to_protect }}.key;
|
||||||
|
|
||||||
|
include {{ nginx_yprox_shared_bo_location_path }};
|
||||||
|
include {{ nginx_yprox_conf_bo_logs_path }};
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
server_name alp.{{ domain_to_protect }};
|
||||||
|
|
||||||
|
root {{ alp_live_directory }};
|
||||||
|
include {{ nginx_bots_cfg_path }}/blockbots.conf;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
ssl_certificate {{ full_certificates_path }}/fullchain.cer;
|
||||||
|
ssl_certificate_key {{ full_certificates_path }}/{{ domain_to_protect }}.key;
|
||||||
|
|
||||||
|
include {{ nginx_yprox_shared_alp_location_path }};
|
||||||
|
}
|
|
@ -155,6 +155,11 @@ sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/setup-ngxblocker/commented/opensuse.conf
|
||||||
sudo bash ${TRAVIS_BUILD_DIR}/.dev-tools/setup-ngxblocker/setup-ngxblocker -x -m ${TRAVIS_BUILD_DIR}/.dev-tools/setup-ngxblocker/commented/opensuse.conf.modified
|
sudo bash ${TRAVIS_BUILD_DIR}/.dev-tools/setup-ngxblocker/setup-ngxblocker -x -m ${TRAVIS_BUILD_DIR}/.dev-tools/setup-ngxblocker/commented/opensuse.conf.modified
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup_ansible1 () {
|
||||||
|
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/setup-ngxblocker/vhost-cases/ansible.conf ${TRAVIS_BUILD_DIR}/.dev-tools/setup-ngxblocker/vhost-cases/ansible.vhost
|
||||||
|
sudo bash ${TRAVIS_BUILD_DIR}/.dev-tools/setup-ngxblocker/setup-ngxblocker -v ${TRAVIS_BUILD_DIR}/.dev-tools/setup-ngxblocker/vhost-cases/ -x -e vhost
|
||||||
|
}
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# Trigger Functions
|
# Trigger Functions
|
||||||
# -----------------
|
# -----------------
|
||||||
|
@ -178,6 +183,7 @@ setup_fedoraMI2
|
||||||
setup_opensuse
|
setup_opensuse
|
||||||
setup_opensuseMI
|
setup_opensuseMI
|
||||||
setup_opensuseMI2
|
setup_opensuseMI2
|
||||||
|
setup_ansible1
|
||||||
|
|
||||||
# ----------------------
|
# ----------------------
|
||||||
# Exit With Error Number
|
# Exit With Error Number
|
||||||
|
|
Loading…
Add table
Reference in a new issue