mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 03:11:55 +02:00
Add integration tests for nginx plugin (#5441)
* Add a rewrite directive for the .well-known location so we don't hit existing rewrites * add comment * Add (nonexistent) document root so we don't use the default value * Add integration tests for nginx plugin * add a sleep 5 to test on travis * put sleep 5 in the right spot * test return status of grep respecting -e and note that we're actually not posix compliant * redelete newline
This commit is contained in:
@@ -49,9 +49,9 @@ http {
|
||||
|
||||
server {
|
||||
# IPv4.
|
||||
listen 5002;
|
||||
listen 5002 $default_server;
|
||||
# IPv6.
|
||||
listen [::]:5002 default ipv6only=on;
|
||||
listen [::]:5002 $default_server;
|
||||
server_name nginx.wtf nginx2.wtf;
|
||||
|
||||
root $root/webroot;
|
||||
@@ -62,5 +62,36 @@ http {
|
||||
try_files \$uri \$uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 5002;
|
||||
listen [::]:5002;
|
||||
server_name nginx3.wtf;
|
||||
|
||||
root $root/webroot;
|
||||
|
||||
location /.well-known/ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
return 301 https://\$host\$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8082;
|
||||
listen [::]:8082;
|
||||
server_name nginx4.wtf nginx5.wtf;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 5002;
|
||||
listen [::]:5002;
|
||||
listen 5001 ssl;
|
||||
listen [::]:5001 ssl;
|
||||
if (\$scheme != "https") {
|
||||
return 301 https://\$host\$request_uri;
|
||||
}
|
||||
server_name nginx6.wtf nginx7.wtf;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user