writefreely/server/templates/nginx.conf.j2
changeset 202 252069788104
parent 200 10051617d075
equal deleted inserted replaced
201:e209c4dc5280 202:252069788104
    32 
    32 
    33     location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) {
    33     location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) {
    34         proxy_set_header Host $host;
    34         proxy_set_header Host $host;
    35         proxy_set_header X-Real-IP $remote_addr;
    35         proxy_set_header X-Real-IP $remote_addr;
    36         proxy_set_header X-Forwarded-For $remote_addr;
    36         proxy_set_header X-Forwarded-For $remote_addr;
    37 
    37         proxy_pass http://127.0.0.1:{{nginx_proxy_port}};
    38         set $upstream http://127.0.0.1:{{nginx_proxy_port}};
       
    39         proxy_pass $upstream;
       
    40 
       
    41         proxy_redirect off;
    38         proxy_redirect off;
    42     }
    39     }
    43 
    40 
    44     location ~ ^/(css|img|js|fonts)/ {
    41     location ~ ^/(css|img|js|fonts)/ {
    45         root {{nginx_static_content}};
    42         root {{nginx_static_content}};
    49 
    46 
    50     location / {
    47     location / {
    51         proxy_set_header Host $host;
    48         proxy_set_header Host $host;
    52         proxy_set_header X-Real-IP $remote_addr;
    49         proxy_set_header X-Real-IP $remote_addr;
    53         proxy_set_header X-Forwarded-For $remote_addr;
    50         proxy_set_header X-Forwarded-For $remote_addr;
    54 
    51         proxy_pass http://127.0.0.1:{{nginx_proxy_port}};
    55         set $upstream http://127.0.0.1:{{nginx_proxy_port}};
       
    56         proxy_pass $upstream;
       
    57 
       
    58         proxy_redirect off;
    52         proxy_redirect off;
    59     }
    53     }
    60 }
    54 }