mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-21 13:54:15 -07:00
Modified Nginx test scripts
This commit is contained in:
parent
1dec034f77
commit
afafde2571
15 changed files with 391 additions and 13 deletions
|
@ -35,7 +35,7 @@ ADD zerotier-cli /
|
|||
ADD netcon_entrypoint.sh /netcon_entrypoint.sh
|
||||
RUN chmod -v +x /netcon_entrypoint.sh
|
||||
|
||||
ADD nginx.conf /
|
||||
ADD nginx.conf_ /
|
||||
|
||||
# Start ZeroTier-One
|
||||
CMD ["./netcon_entrypoint.sh"]
|
||||
|
|
|
@ -6,7 +6,7 @@ export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/
|
|||
# --- Test Parameters ---
|
||||
test_namefile=$(ls *.name)
|
||||
test_name="${test_namefile%.*}" # test network id
|
||||
nwconf=$(ls *.conf) # blank test network config file
|
||||
nwconf=$(ls *.{conf,}) # blank test network config file
|
||||
nwid="${nwconf%.*}" # test network id
|
||||
file_path=/opt/results/ # test result output file path (fs shared between host and containers)
|
||||
file_base="$test_name".txt # test result output file
|
||||
|
@ -35,7 +35,7 @@ echo $virtip4 > "$address_file"
|
|||
export ZT_NC_NWID=$dev
|
||||
|
||||
# --- Test section ---
|
||||
cp -f nginx.conf /etc/nginx/nginx.conf
|
||||
cp -f nginx.conf_ /etc/nginx/nginx.conf
|
||||
nginx_html_path=/usr/share/nginx/html/
|
||||
# Generate large random file for transfer test, share md5sum for monitor container to check
|
||||
echo '*** Generating ' "$bigfile_size" ' file'
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
# For more information on configuration, see:
|
||||
# * Official English Documentation: http://nginx.org/en/docs/
|
||||
# * Official Russian Documentation: http://nginx.org/ru/docs/
|
||||
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# Load modular configuration files from the /etc/nginx/conf.d directory.
|
||||
# See http://nginx.org/en/docs/ngx_core_module.html#include
|
||||
# for more information.
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
#listen [::]:80 default_server;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
# Load configuration files for the default server block.
|
||||
include /etc/nginx/default.d/*.conf;
|
||||
|
||||
location / {
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
location = /40x.html {
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue