> For the complete documentation index, see [llms.txt](https://oguzhaninan.gitbook.io/haproxy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oguzhaninan.gitbook.io/haproxy/temel-terimler/frontend.md).

# Frontend

HAProxy'yi `backend` sunucularınızın önüne bir ters proxy olarak yerleştirdiğinizde, bir `backend` bölümü, istemcilerin bağlanabileceği IP adreslerini ve bağlantı noktalarını tanımlar. Çeşitli web sitelerini İnternet'e açmak için gereken sayıda `frontend` bölümü ekleyebilirsiniz. Her bir `frontend` anahtar sözcüğünü, onu diğerlerinden ayırmak için [www.mysite.com](http://www.mysite.com) gibi bir etiket almalı.

```
frontend www.mysite.com
    bind 10.0.0.3:80
    bind 10.0.0.3:443 ssl crt /etc/ssl/certs/mysite.pem
    http-request redirect scheme https unless { ssl_fc }
    use_backend api_servers if { path_beg /api/ }
    default_backend web_servers
```

### bind

Belirli bir IP adresine ve bağlantı noktasına dinleyici atar. Tek bir bağlantı noktası, bir aralık veya virgülle ayrılmış bir liste olabilir. Web sunucularınızın bunu yapmak yerine HAProxy ile SSL/TLS sonlandırması yapmak için genellikle `ssl` ve `crt`  değişkenleri kullanılır.

### http-request redirect

İstemciye farklı bir URL denemesi gerektiğini söyler. Örneğimizde, web sitenizi şifrelenmemiş HTTP üzerinden talep eden istemciler sitenin HTTPS sürümüne yönlendirilir.

### use\_backend

Belirli bir koşul doğruysa gelen isteklere yanıt vermek için bir `backend` sunucu havuzu seçer. Bunu, `if path_bef /api/`  gibi HAProxy'nin adresin api/ ile başlayıp başlamadığını kontrol edebilen bazı ölçütlere göre belirli bir arka uç seçmesine izin veren bir ACL ifadesi gelir. Bu satırlar gerekli değildir ve genelde `frontend` bölümünün yalnızca `default_backend` satırı vardır ve özel seçim kuralları yoktur.

### default\_backend

Hemen hemen her ön uçta bulunur ve bir `use_backend` kuralı önce başka bir yere göndermezse trafik göndermek için bir `backend` adı verir. Bir istek bir `use_backend` veya `default_backend` yönergesi ile yönlendirilmezse, HAProxy 503 Hizmet Kullanılamaz hatası döndürür.


---

# 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:

```
GET https://oguzhaninan.gitbook.io/haproxy/temel-terimler/frontend.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
