> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/tr/yapilandirma/overleaf-toolkit/tls-proxy.md).

# TLS vekil sunucusu

NGINX kullanarak HTTPS bağlantılarını sonlandırmak için isteğe bağlı bir TLS proxy.

Çalıştır `bin/init --tls` NGINX proxy yapılandırmasıyla yerel yapılandırmayı başlatmak ya da mevcut bir yerel yapılandırmaya NGINX proxy yapılandırması eklemek için. Bir **örnek** özel anahtar oluşturulur `config/nginx/certs/overleaf_key.pem` ve bir **sahte** sertifika `config/nginx/certs/overleaf_certificate.pem`. Bunların yerine gerçek özel anahtarınızı ve sertifikanızı koyun ya da `TLS_PRIVATE_KEY_PATH` ve `TLS_CERTIFICATE_PATH` değişkenlerinin değerlerini sırasıyla gerçek özel anahtarınızın ve sertifikanızın yolları olarak ayarlayın.

NGINX için varsayılan bir yapılandırma şu dosyada sağlanır: `config/nginx/nginx.conf` ihtiyaçlarınıza göre özelleştirilebilir. Yapılandırma dosyasının yolu şu `NGINX_CONFIG_PATH` değişkeni ile değiştirilebilir.

{% hint style="success" %}
Eğer bir **docker-compose.yml** tabanlı bir dağıtımınız varsa veya kendi NGINX ters proxy’nizi yönetiyorsanız, bir örnek **nginx.conf** dosyasını [burada](https://github.com/overleaf/toolkit/blob/master/lib/config-seed/nginx.conf).
{% endhint %}

Şu bölümü `config/overleaf.rc` dosyanıza, zaten orada yoksa, ekleyin:

```
# TLS proxy yapılandırması (isteğe bağlı)
NGINX_ENABLED=false
NGINX_CONFIG_PATH=config/nginx/nginx.conf
NGINX_HTTP_PORT=80

# Bu IP adreslerini ana makinenizin dış IP adresiyle değiştirin
NGINX_HTTP_LISTEN_IP=127.0.1.1 
NGINX_TLS_LISTEN_IP=127.0.1.1
TLS_PRIVATE_KEY_PATH=config/nginx/certs/overleaf_key.pem
TLS_CERTIFICATE_PATH=config/nginx/certs/overleaf_certificate.pem
TLS_PORT=443
```

{% hint style="danger" %}
Harici bir TLS proxy kullanıyorsanız (yani Overleaf Toolkit tarafından yönetilmiyorsa), lütfen şunun `OVERLEAF_TRUSTED_PROXY_IPS=loopback,<ip-of-your-tls-proxy>` şu dosyada ayarlı olduğundan emin olun `config/variables.env`, örn. `OVERLEAF_TRUSTED_PROXY_IPS=loopback,192.168.13.37`.
{% endhint %}

{% hint style="danger" %}
Eğer `172.16.0.0/12` (Docker ağları için varsayılan alt ağ) alt ağını yerel ağınız için kullanıyorsanız, şunu ayarlamanız gerekir `OVERLEAF_TRUSTED_PROXY_IPS=loopback,<network>` şu `config/variables.env`. Burada `<network>` şudur `IPAM -> Config -> Subnet` değeri `docker inspect overleaf_default`, örn. `OVERLEAF_TRUSTED_PROXY_IPS=loopback,172.19.0.0/16`. Bu, `X-Forwarded` başlıklarının taklit edilmesini önlemek içindir.
{% endhint %}

{% hint style="info" %}
Eğer `OVERLEAF_TRUSTED_PROXY_IPS` manuel olarak ayarlanmazsa varsayılan değeri `loopback`. Elle ayarlıyorsanız, şunlardan birini içerdiğinden emin olmalısınız: `loopback`, `localhost` veya `127.0.0.1`, bu da **nginx** örneğini **sharelatex** konteyneri içinde çalışan.
{% endhint %}

Güvenilen proxy IP'lerini doğru yapılandırdıysanız, genel IP adresinizi `/user/sessions` sayfasında şu şekilde görmelisiniz:

<figure><img src="/files/bb3e7736aa51a718524c552d7bbe5d99f50667fb" alt="" width="375"><figcaption></figcaption></figure>

Yukarıda gösterilen IP adresi hâlâ `127.0.0.1` gibi bir şeyse `OVERLEAF_TRUSTED_PROXY_IPS`.

Proxy'yi çalıştırmak için `NGINX_ENABLED` değişkeninin değerini `config/overleaf.rc` içinde `false` şuraya `true` ve `bin/up komutunu yeniden çalıştırın`.

Varsayılan olarak, HTTPS web arayüzü şu adreste kullanılabilir olacaktır `https://127.0.1.1:443`. Şuraya yapılan bağlantılar `http://127.0.1.1:80` şuraya yönlendirilecektir `https://127.0.1.1:443`. NGINX'in dinlediği IP adresini değiştirmek için şu `NGINX_HTTP_LISTEN_IP` ve `NGINX_TLS_LISTEN_IP` değişkenleri. Bağlantı noktaları şu değişkenler aracılığıyla değiştirilebilir: `NGINX_HTTP_PORT` ve `TLS_PORT` değişkenleri.

NGINX şu hata mesajıyla başlatılamazsa `Error starting userland proxy: listen tcp4 ... bind: address already in use` şunun `OVERLEAF_LISTEN_IP:OVERLEAF_PORT` ile çakışmadığından emin olun `NGINX_HTTP_LISTEN_IP:NGINX_HTTP_PORT`.

```mermaid
sequenceDiagram
participant user as Kullanıcı
participant external as Dış Ana Makine
participant internal as İç Ana Makine
participant nginx as nginx
participant sharelatex as sharelatex
participant git-bridge as git-bridge
%% Kullanıcı dış ana makineye HTTP ile bağlanır
user->>+ external: HTTP
note over external: NGINX_HTTP_LISTEN_IP:NGINX_HTTP_PORT
external->>+ nginx: HTTP
note over nginx: nginx:80
nginx-->>-external: 301
%% Kullanıcı dış ana makineye HTTPS ile bağlanır
user->>+ external: HTTPS
note over external: NGINX_TLS_LISTEN_IP:TLS_PORT
external->>+ nginx: HTTPS
note over nginx: nginx:443
nginx->>+ sharelatex: HTTP
note over sharelatex: sharlatex:80
%% Kullanıcı localhost HTTP ile bağlanır
user->>+ internal: HTTP
note over internal: OVERLEAF_LISTEN_IP:OVERLEAF_PORT
internal->>+sharelatex: HTTP
note over sharelatex: sharlatex:80
%% sharelatex git-bridge'e bağlanır
sharelatex->>+git-bridge: HTTP /git/
note over git-bridge: git-bridge:8000
note over sharelatex: GIT_BRIDGE_HOST:GIT_BRIDGE_PORT
git-bridge->>+sharelatex: WEB/WEB-API:3000
git-bridge->>+sharelatex: HISTORY-V1:3100
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/tr/yapilandirma/overleaf-toolkit/tls-proxy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
