mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 13:59:02 -04:00
Test cases from upstream parser project issues
This commit is contained in:
parent
b48ddac528
commit
7f27ccd941
2 changed files with 84 additions and 0 deletions
|
|
@ -0,0 +1,78 @@
|
|||
# from https://github.com/fatiherikli/nginxparser/issues/17
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name prod.example.com example.com stage.example.com;
|
||||
|
||||
ssl_certificate ssl.crt/example.com.crt;
|
||||
ssl_certificate_key ssl.key/example.com.key;
|
||||
|
||||
keepalive_timeout 5;
|
||||
|
||||
access_log /var/log/nginx/example.access.log;
|
||||
error_log /var/log/nginx/example.error.log;
|
||||
|
||||
root /var/www/example/cs/current;
|
||||
|
||||
client_max_body_size 20M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/index.html @cs_shared;
|
||||
}
|
||||
|
||||
location /images {
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location /scripts {
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location /styles {
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location @cs_shared {
|
||||
root /var/www/example/cs/shared/public;
|
||||
try_files $uri $uri/index.html @ss;
|
||||
}
|
||||
|
||||
location @ss {
|
||||
root /var/www/example/ss/current/public;
|
||||
try_files $uri @index;
|
||||
}
|
||||
|
||||
location @index {
|
||||
root /var/www/example/cs/current;
|
||||
rewrite ^ /index.html break;
|
||||
}
|
||||
|
||||
location @rails {
|
||||
proxy_pass http://example-ror;
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Request-Start "t=${msec}";
|
||||
proxy_redirect off;
|
||||
|
||||
proxy_read_timeout 300;
|
||||
|
||||
proxy_buffer_size 16k;
|
||||
proxy_buffers 32 16k;
|
||||
|
||||
}
|
||||
|
||||
location ~* ^/(api|assets|system|rich|admin) {
|
||||
root /var/www/example/ss/current/public;
|
||||
try_files $uri @rails;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /500.html;
|
||||
location = /500.html {
|
||||
root /var/www/example/cs/current;
|
||||
}
|
||||
|
||||
error_page 405 =200 $uri;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# from https://github.com/fatiherikli/nginxparser/issues/19
|
||||
|
||||
map $http_user_agent $mobile {
|
||||
default 0;
|
||||
"~Opera Mini" 1;
|
||||
}
|
||||
Loading…
Reference in a new issue