Page MenuHomeDevCentral

phabricator.conf
No OneTemporary

phabricator.conf

# -------------------------------------------------------------
# Configuration for Docker PaaS front-end nginx
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Author: Sébastien Santoro aka Dereckson
# Created: 2018-09-11
# Source file: roles/paas-docker/nginx/files/vhosts/phabricator.conf
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# -------------------------------------------------------------
# Application - {{ fqdn }}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
server {
listen 80;
listen [::]:80;
server_name {{ fqdn }};
return 301 https://$host$request_uri;
}
server {
server_name {{ fqdn }};
include includes/letsencrypt;
include includes/tls;
ssl_certificate /srv/letsencrypt/etc/live/{{ fqdn }}/fullchain.pem;
ssl_certificate_key /srv/letsencrypt/etc/live/{{ fqdn }}/privkey.pem;
include includes/proxy_params;
proxy_redirect off;
location / {
proxy_pass http://localhost:{{ app_port }};
}
location ~ ^/maniphest/task/create {
rewrite ^/maniphest/task/create/?(.*) /maniphest/task/edit/form/1/$1;
}
location = /ws/ {
proxy_pass http://localhost:22280;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 999999999;
}
#502 error
root /var/wwwroot-502/{{ fqdn }};
error_page 502 /502.html;
location /502.html {}
}
# -------------------------------------------------------------
# Static content
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
server {
listen 80;
listen [::]:80;
server_name {{ args['static_host'] }};
return 301 https://$host$request_uri;
}
server {
server_name {{ args['static_host'] }};
include includes/tls;
ssl_certificate /srv/letsencrypt/etc/live/{{ fqdn }}/fullchain.pem;
ssl_certificate_key /srv/letsencrypt/etc/live/{{ fqdn }}/privkey.pem;
include includes/letsencrypt;
location / {
proxy_pass http://localhost:{{ app_port }};
include includes/proxy_params;
proxy_redirect off;
}
}
{%- if 'blogs' in args %}
{%- for blog_name, blog in args['blogs'].items() %}
# -------------------------------------------------------------
# Phame domains for {{ blog_name }}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
server {
listen 80;
listen [::]:80;
server_name {{ blog['host'] }};
return 301 https://$host$request_uri;
}
server {
server_name {{ blog['host'] }};
include includes/tls;
ssl_certificate /srv/letsencrypt/etc/live/{{ fqdn }}/fullchain.pem;
ssl_certificate_key /srv/letsencrypt/etc/live/{{ fqdn }}/privkey.pem;
include includes/letsencrypt;
location / {
proxy_pass http://localhost:{{ app_port }};
include includes/proxy_params;
proxy_redirect off;
}
# Fixes invalid URLs resolved to phame instead of DevCentral
location ~ T[0.9]* {
rewrite ^ http://{{ fqdn }}$request_uri? redirect;
}
# Fixes invalid URLs resolved to phame instead of DevCentral
location /tag/ {
rewrite ^ http://{{ fqdn }}$request_uri? redirect;
}
# 502 error
root /var/wwwroot-502/{{ fqdn }};
error_page 502 /502.html;
location /502.html {}
}
# -------------------------------------------------------------
# Phame domains for {{ blog_name }} — aliases
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
server {
listen 80;
listen [::]:80;
server_name {{ blog['aliases']|join(' ') }};
include includes/tls;
ssl_certificate /srv/letsencrypt/etc/live/{{ fqdn }}/fullchain.pem;
ssl_certificate_key /srv/letsencrypt/etc/live/{{ fqdn }}/privkey.pem;
include includes/letsencrypt;
return 301 https://{{ blog['host'] }}$request_uri;
}
{%- endfor %}
{%- endif %}
{%- if aliases %}
# -------------------------------------------------------------
# Redirects for app aliases domains
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
server {
listen 80;
listen [::]:80;
server_name {{ aliases }};
include includes/tls;
ssl_certificate /srv/letsencrypt/etc/live/{{ fqdn }}/fullchain.pem;
ssl_certificate_key /srv/letsencrypt/etc/live/{{ fqdn }}/privkey.pem;
include includes/letsencrypt;
return 301 https://{{ fqdn }}$request_uri;
}
{%- endif %}

File Metadata

Mime Type
text/plain
Expires
Fri, Feb 28, 22:47 (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2439372
Default Alt Text
phabricator.conf (4 KB)

Event Timeline