From: Ludovic CHEVALIER Date: Thu, 23 Feb 2017 13:25:14 +0000 (+0100) Subject: SuppressionĀ : etc/nginx/site.d/lhc-questionnaires* X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=commitdiff_plain;h=417b608980fd246dd8a10c86897abe9ab2d6eac6 SuppressionĀ : etc/nginx/site.d/lhc-questionnaires* --- diff --git a/etc/nginx/site.d/lhc-questionnaires-tls/local.conf b/etc/nginx/site.d/lhc-questionnaires-tls/local.conf deleted file mode 100644 index f3ce105..0000000 --- a/etc/nginx/site.d/lhc-questionnaires-tls/local.conf +++ /dev/null @@ -1,4 +0,0 @@ -listen 443; -include /etc/nginx/conf.d/ssl.conf; -ssl_certificate /etc/nginx/x509.d/lhc-questionnaires-tls/crt.pem; -ssl_certificate_key /etc/nginx/x509.d/lhc-questionnaires-tls/key.pem; diff --git a/etc/nginx/site.d/lhc-questionnaires-tls/local.sh b/etc/nginx/site.d/lhc-questionnaires-tls/local.sh deleted file mode 100644 index ef7611a..0000000 --- a/etc/nginx/site.d/lhc-questionnaires-tls/local.sh +++ /dev/null @@ -1,10 +0,0 @@ -hint="run before: remote/runit-configure nginx -- $site" -assert "sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint - -sudo install -m 664 -o www -g www \ - "$tool"/var/pub/x509/questionnaires.heureux-cyclage.org/crt+ca.pem \ - /etc/nginx/x509.d/"$site"/crt.pem - -sudo rmdir ~www-data/"$site" || true -sudo ln -fns "${site%-tls}" ~www-data/"$site" - diff --git a/etc/nginx/site.d/lhc-questionnaires-tls/site.conf b/etc/nginx/site.d/lhc-questionnaires-tls/site.conf deleted file mode 120000 index 808b291..0000000 --- a/etc/nginx/site.d/lhc-questionnaires-tls/site.conf +++ /dev/null @@ -1 +0,0 @@ -../lhc-questionnaires/site.conf \ No newline at end of file diff --git a/etc/nginx/site.d/lhc-questionnaires-tls/x509_host b/etc/nginx/site.d/lhc-questionnaires-tls/x509_host deleted file mode 100644 index a967ee9..0000000 --- a/etc/nginx/site.d/lhc-questionnaires-tls/x509_host +++ /dev/null @@ -1 +0,0 @@ -questionnaires.heureux-cyclage.org diff --git a/etc/nginx/site.d/lhc-questionnaires/http.conf b/etc/nginx/site.d/lhc-questionnaires/http.conf deleted file mode 100644 index 7961ac0..0000000 --- a/etc/nginx/site.d/lhc-questionnaires/http.conf +++ /dev/null @@ -1,8 +0,0 @@ -map $arg_r $lhc_questionnaires_ptitvelo_url_blacklist { - default 0; - include /etc/nginx/site.d/lhc-questionnaires/ptitvelo_url_blacklist.map; - } -map $remote_addr $lhc_questionnaires_ptitvelo_ip_whitelist { - default 0; - include /etc/nginx/site.d/lhc-questionnaires/ptitvelo_ip_whitelist.map; - } diff --git a/etc/nginx/site.d/lhc-questionnaires/local.conf b/etc/nginx/site.d/lhc-questionnaires/local.conf deleted file mode 100644 index 56b9f1c..0000000 --- a/etc/nginx/site.d/lhc-questionnaires/local.conf +++ /dev/null @@ -1 +0,0 @@ -listen 80; diff --git a/etc/nginx/site.d/lhc-questionnaires/local.sh b/etc/nginx/site.d/lhc-questionnaires/local.sh deleted file mode 100644 index fa8e76b..0000000 --- a/etc/nginx/site.d/lhc-questionnaires/local.sh +++ /dev/null @@ -1,5 +0,0 @@ -pool=lhc_quest -sudo adduser php_"$pool" www-"$site" -sudo adduser www-"$site"-tls www-"$site" -"$tool"/local/mysql-user-create php_"$pool" -"$tool"/local/mysql-database-create php_"$pool" diff --git a/etc/nginx/site.d/lhc-questionnaires/site.conf b/etc/nginx/site.d/lhc-questionnaires/site.conf deleted file mode 100644 index 6527705..0000000 --- a/etc/nginx/site.d/lhc-questionnaires/site.conf +++ /dev/null @@ -1,63 +0,0 @@ -server_name - questionnaires.heureux-cyclage.org - formations.heureux-cyclage.org - rencontres.heureux-cyclage.org; - -client_body_buffer_size 8k; -client_max_body_size 10m; -location / { - if ($host = "formations.heureux-cyclage.org") { - return 302 "$scheme://questionnaires.heureux-cyclage.org/index.php?r=survey/index&sid=367568"; - } - if ($host = "rencontres.heureux-cyclage.org") { - return 302 "$scheme://questionnaires.heureux-cyclage.org/index.php?r=survey/index&sid=462499"; - } - index index.html index.htm index.php; - } -location ~* ^.+\.(css|gif|html|ico|jpeg|js|jpg|png|txt|xml)$ { - access_log off; - expires 30d; - log_not_found off; - } -location ~ /\. { - access_log off; - deny all; - log_not_found off; - } -location ~ \.php$ { - include /etc/nginx/conf.d/fastcgi.conf; - set $deny "${lhc_questionnaires_ptitvelo_url_blacklist}${lhc_questionnaires_ptitvelo_ip_whitelist}"; - if ($deny = "10") { - return 403; - } - set $no_cache "0"; - if ($request_method !~ ^(GET|HEAD)$) { - # NOTE: if non GET/HEAD, don't cache and mark user as uncacheable for 1 second via cookie. - set $no_cache "1"; - } - if ($no_cache = "1") { - # NOTE: drop no cache cookie if need be (for some reason, add_header fails if included in prior if-block). - add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/"; - add_header X-Microcachable "0"; - } - if ($http_cookie ~* "_mcnc") { - # NOTE: bypass cache if no-cache cookie is set - set $no_cache "1"; - } - fastcgi_cache_bypass $no_cache; - fastcgi_cache_use_stale updating; - fastcgi_cache_valid 200 10s; - fastcgi_cache_valid 404 10m; - fastcgi_ignore_headers Cache-Control Expires Set-Cookie; - fastcgi_index index.php; - fastcgi_no_cache $no_cache; - fastcgi_param REDIRECT_STATUS 200; - # NOTE: PHP only, required if PHP was built with --enable-force-cgi-redirect - fastcgi_pass_header Cookie; - fastcgi_pass_header Set-Cookie; - fastcgi_split_path_info ^(.+\.php)(/.+)$; - - fastcgi_pass unix:/run/php5/fpm/lhc_quest; - } - -# vim: ft=sh