From 60b1e7137c2ff55ca1ec7e6534eef816c371f8fa Mon Sep 17 00:00:00 2001 From: Hamza Dely Date: Mon, 26 Oct 2015 21:49:45 +0100 Subject: [PATCH] Configuration de tracker pour Phabricator --- Bundler/phabricator.xml | 12 ++++ Metadata/groups.xml | 10 +++- Python/etc/nginx/sites-available/phabricator | 60 +++++++++++++++++++ .../phabricator_alt_file_domain | 60 +++++++++++++++++++ 4 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 Bundler/phabricator.xml create mode 100644 Python/etc/nginx/sites-available/phabricator create mode 100644 Python/etc/nginx/sites-available/phabricator_alt_file_domain diff --git a/Bundler/phabricator.xml b/Bundler/phabricator.xml new file mode 100644 index 0000000..524a42a --- /dev/null +++ b/Bundler/phabricator.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Metadata/groups.xml b/Metadata/groups.xml index 0a362b4..f5f38b4 100644 --- a/Metadata/groups.xml +++ b/Metadata/groups.xml @@ -403,8 +403,10 @@ - + + + + + + + + @@ -1104,7 +1111,6 @@ - diff --git a/Python/etc/nginx/sites-available/phabricator b/Python/etc/nginx/sites-available/phabricator new file mode 100644 index 0000000..4a24a3a --- /dev/null +++ b/Python/etc/nginx/sites-available/phabricator @@ -0,0 +1,60 @@ +# -*- mode: python; encoding: utf-8 -*- + +info["owner"] = "root" +info["group"] = "root" +info["mode"] = 0644 + +comment_start = "#" + +out("""server { + listen 80; + listen [::]:80 ipv6only=on; + server_name phabricator phabricator.crans.org; + + return 301 https://phabricator.crans.org$request_uri; + # On spécifie au client qu'il ne doit pas faire de HTTP ici + add_header Strict-Transport-Security "max-age=31536000"; +} + +server { + listen 443; + listen [::]:443 ipv6only=on; + server_name phabricator phabricator.crans.org; + root /var/phabricator/phabricator/webroot; + + ssl on; + ssl_certificate /etc/ssl/certs/phabricator.pem; + ssl_certificate_key /etc/ssl/private/phabricator.key; + + location / { + index index.php; + rewrite ^/(.*)$ /index.php?__path__=/$1 last; + } + + location = /favicon.ico { + try_files $uri =204; + } + + location /index.php { + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + + #required if PHP was built with --enable-force-cgi-redirect + fastcgi_param REDIRECT_STATUS 200; + + #variables to make the $_SERVER populate in PHP + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param QUERY_STRING $query_string; + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param CONTENT_TYPE $content_type; + fastcgi_param CONTENT_LENGTH $content_length; + + fastcgi_param SCRIPT_NAME $fastcgi_script_name; + + fastcgi_param GATEWAY_INTERFACE CGI/1.1; + fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + + fastcgi_param REMOTE_ADDR $remote_addr; + } +}""") + diff --git a/Python/etc/nginx/sites-available/phabricator_alt_file_domain b/Python/etc/nginx/sites-available/phabricator_alt_file_domain new file mode 100644 index 0000000..14097b5 --- /dev/null +++ b/Python/etc/nginx/sites-available/phabricator_alt_file_domain @@ -0,0 +1,60 @@ +# -*- mode: python; encoding: utf-8 -*- + +info["owner"] = "root" +info["group"] = "root" +info["mode"] = 0644 + +comment_start = "#" + +out("""server { + listen 80; + listen [::]:80; + server_name tracker tracker.crans.org; + + return 301 https://tracker.crans.org$request_uri; + # On spécifie au client qu'il ne doit pas faire de HTTP ici + add_header Strict-Transport-Security "max-age=31536000"; +} + +server { + listen 443; + listen [::]:443; + server_name tracker tracker.crans.org; + root /var/phabricator/phabricator/webroot; + + ssl on; + ssl_certificate /etc/ssl/certs/phabricator.pem; + ssl_certificate_key /etc/ssl/private/phabricator.key; + + location / { + index index.php; + rewrite ^/(.*)$ /index.php?__path__=/$1 last; + } + + location = /favicon.ico { + try_files $uri =204; + } + + location /index.php { + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + + #required if PHP was built with --enable-force-cgi-redirect + fastcgi_param REDIRECT_STATUS 200; + + #variables to make the $_SERVER populate in PHP + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param QUERY_STRING $query_string; + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param CONTENT_TYPE $content_type; + fastcgi_param CONTENT_LENGTH $content_length; + + fastcgi_param SCRIPT_NAME $fastcgi_script_name; + + fastcgi_param GATEWAY_INTERFACE CGI/1.1; + fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + + fastcgi_param REMOTE_ADDR $remote_addr; + } +}""") +