{"id":32647,"date":"2025-10-24T07:40:45","date_gmt":"2025-10-24T04:40:45","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=32647"},"modified":"2025-10-24T07:40:45","modified_gmt":"2025-10-24T04:40:45","slug":"flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/","title":{"rendered":"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama"},"content":{"rendered":"<p><body><\/p>\n<h2>Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama<\/h2>\n<p>Flask, Python tabanl\u0131 hafif ve esnek bir web \u00e7at\u0131s\u0131d\u0131r (web framework). K\u00fc\u00e7\u00fck ve orta \u00f6l\u00e7ekli web uygulamalar\u0131, API&#8217;ler ve mikro hizmetler geli\u015ftirmek i\u00e7in idealdir. Ancak Flask&#8217;\u0131n dahili geli\u015ftirme sunucusu (development server) \u00fcretim ortamlar\u0131 i\u00e7in tasarlanmam\u0131\u015ft\u0131r. \u00dcretim ortam\u0131nda Flask uygulamalar\u0131n\u0131 g\u00fcvenli, performansl\u0131 ve \u00f6l\u00e7eklenebilir bir \u015fekilde yay\u0131nlamak i\u00e7in bir WSGI (Web Server Gateway Interface) sunucusu ve bir ters proxy (reverse proxy) kullanmak gerekir. Bu makalede, Flask uygulamalar\u0131n\u0131z\u0131 Ubuntu 18.04 i\u015fletim sistemi \u00fczerinde Gunicorn WSGI sunucusu ve Nginx ters proxy sunucusu ile nas\u0131l yay\u0131nlayaca\u011f\u0131n\u0131z\u0131 ad\u0131m ad\u0131m detayl\u0131 bir \u015fekilde anlataca\u011f\u0131z.<\/p>\n<p>Bu kurulum, uygulaman\u0131z\u0131n performans\u0131n\u0131 art\u0131r\u0131rken ayn\u0131 zamanda g\u00fcvenlik ve y\u00f6netilebilirlik a\u00e7\u0131s\u0131ndan da \u00f6nemli avantajlar sunar. Gunicorn, Flask uygulaman\u0131z ile Nginx aras\u0131nda bir k\u00f6pr\u00fc g\u00f6revi g\u00f6r\u00fcrken, Nginx gelen istemci isteklerini y\u00f6neterek statik dosyalar\u0131 sunar, SSL sonland\u0131rmas\u0131 yapar ve y\u00fck dengeleme gibi geli\u015fmi\u015f \u00f6zellikler sa\u011flar.<\/p>\n<h3>Neden Gunicorn ve Nginx Kullanmal\u0131y\u0131z?<\/h3>\n<p>Flask&#8217;\u0131n kendi geli\u015ftirme sunucusu, ayn\u0131 anda yaln\u0131zca tek bir iste\u011fi i\u015fleyebilir ve g\u00fcvenlik a\u00e7\u0131klar\u0131na kar\u015f\u0131 savunmas\u0131zd\u0131r. \u00dcretim ortam\u0131nda ger\u00e7ek d\u00fcnya trafi\u011fini y\u00f6netmek i\u00e7in tasarlanmam\u0131\u015ft\u0131r. \u0130\u015fte Gunicorn ve Nginx ikilisinin neden gerekli oldu\u011funu a\u00e7\u0131klayan baz\u0131 temel nedenler:<\/p>\n<h4>Gunicorn (WSGI Sunucusu)<\/h4>\n<p>Gunicorn (Green Unicorn), Python WSGI uygulamalar\u0131 i\u00e7in sa\u011flam ve h\u0131zl\u0131 bir HTTP sunucusu \u00e7\u00f6z\u00fcm\u00fcd\u00fcr. Flask gibi WSGI uyumlu uygulamalar\u0131 \u00e7al\u0131\u015ft\u0131rabilir.<\/p>\n<p>*   <strong>\u00c7oklu \u0130\u015flem Deste\u011fi:<\/strong> Gunicorn, ayn\u0131 anda birden fazla iste\u011fi i\u015flemek i\u00e7in birden fazla i\u015f\u00e7i (worker) s\u00fcreci ba\u015flat\u0131r. Bu, uygulaman\u0131z\u0131n e\u015fzamanl\u0131 kullan\u0131c\u0131 say\u0131s\u0131n\u0131 art\u0131r\u0131r ve daha iyi yan\u0131t s\u00fcreleri sa\u011flar.<br \/>\n*   <strong>Basit ve Hafif:<\/strong> Kurulumu ve yap\u0131land\u0131rmas\u0131 kolayd\u0131r. Kaynak t\u00fcketimi d\u00fc\u015f\u00fckt\u00fcr.<br \/>\n*   <strong>G\u00fcvenilirlik:<\/strong> \u00dcretim ortamlar\u0131nda test edilmi\u015f ve kan\u0131tlanm\u0131\u015f bir \u00e7\u00f6z\u00fcmd\u00fcr. Hata durumlar\u0131nda i\u015f\u00e7i s\u00fcre\u00e7lerini otomatik olarak yeniden ba\u015flatabilir.<br \/>\n*   <strong>WSGI Uyumlulu\u011fu:<\/strong> Python web uygulamalar\u0131 i\u00e7in standart bir aray\u00fcz olan WSGI&#8217;yi destekler, bu da Flask, Django gibi bir\u00e7ok framework ile sorunsuz \u00e7al\u0131\u015fmas\u0131n\u0131 sa\u011flar.<\/p>\n<h4>Nginx (Ters Proxy Sunucusu)<\/h4>\n<p>Nginx, y\u00fcksek performansl\u0131, a\u00e7\u0131k kaynakl\u0131 bir web sunucusu ve ters proxy sunucusudur. Gunicorn gibi bir uygulama sunucusunun \u00f6n\u00fcne yerle\u015ftirilir.<\/p>\n<p>*   <strong>Performans:<\/strong> Nginx, statik dosyalar\u0131 (CSS, JavaScript, resimler vb.) Gunicorn&#8217;dan \u00e7ok daha h\u0131zl\u0131 ve verimli bir \u015fekilde sunabilir.<br \/>\n*   <strong>Y\u00fck Dengeleme:<\/strong> Gelen istekleri birden fazla Gunicorn \u00f6rne\u011fine da\u011f\u0131tarak uygulaman\u0131z\u0131n \u00f6l\u00e7eklenebilirli\u011fini art\u0131rabilir.<br \/>\n*   <strong>SSL\/TLS Sonland\u0131rma:<\/strong> Nginx, SSL sertifikalar\u0131n\u0131 y\u00f6netebilir ve \u015fifreli trafi\u011fi sonland\u0131rarak Gunicorn&#8217;un bu y\u00fckten kurtulmas\u0131n\u0131 sa\u011flar. Bu, uygulaman\u0131z\u0131n g\u00fcvenli\u011fini art\u0131r\u0131r.<br \/>\n*   <strong>G\u00fcvenlik:<\/strong> Do\u011frudan internete a\u00e7\u0131k olan tek bile\u015fen Nginx oldu\u011fu i\u00e7in, potansiyel g\u00fcvenlik a\u00e7\u0131klar\u0131n\u0131 azalt\u0131r ve DDoS sald\u0131r\u0131lar\u0131na kar\u015f\u0131 bir tampon g\u00f6revi g\u00f6rebilir.<br \/>\n*   <strong>Hata Sayfalar\u0131 ve URL Y\u00f6nlendirmeleri:<\/strong> \u00d6zel hata sayfalar\u0131 olu\u015fturabilir ve URL y\u00f6nlendirmeleri gibi geli\u015fmi\u015f trafik y\u00f6netimi yapabilir.<\/p>\n<p>Bu makalede Ubuntu 18.04 kullanmam\u0131z\u0131n nedeni, bu s\u00fcr\u00fcm\u00fcn hala geni\u015f bir kullan\u0131c\u0131 taban\u0131na sahip olmas\u0131 ve bir\u00e7ok kurumsal ortamda tercih edilmesidir. \u0130\u015flemler di\u011fer Ubuntu s\u00fcr\u00fcmlerinde de benzer olacakt\u0131r.<\/p>\n<h3>\u00d6n Gereksinimler<\/h3>\n<p>Bu rehbere ba\u015flamadan \u00f6nce a\u015fa\u011f\u0131daki \u00f6n gereksinimlere sahip olman\u0131z gerekmektedir:<\/p>\n<p>*   Ubuntu 18.04 i\u015fletim sistemine sahip bir sunucu (VPS, EC2 vb.).<br \/>\n*   SSH eri\u015fimi i\u00e7in bir SSH istemcisi.<br \/>\n*   <code>sudo<\/code> ayr\u0131cal\u0131klar\u0131na sahip bir kullan\u0131c\u0131 hesab\u0131 (g\u00fcvenlik nedeniyle root kullan\u0131c\u0131s\u0131 yerine bu kullan\u0131c\u0131 ile \u00e7al\u0131\u015fman\u0131z \u00f6nerilir).<br \/>\n*   \u0130ste\u011fe ba\u011fl\u0131 olarak, uygulaman\u0131z\u0131 yay\u0131nlamak i\u00e7in bir alan ad\u0131 (\u00f6rne\u011fin, <code>ornekuygulama.com<\/code>).<\/p>\n<h3>Ad\u0131m 1: Sunucu Haz\u0131rl\u0131\u011f\u0131 ve Temel Kurulumlar<\/h3>\n<p>\u0130lk olarak sunucumuzu g\u00fcncelleyelim ve gerekli paketleri kural\u0131m. SSH ile sunucunuza ba\u011flan\u0131n.<\/p>\n<pre><code class=\"language-bash\">sudo apt update\nsudo apt upgrade -y<\/code><\/pre>\n<p>Ard\u0131ndan Python 3 ve sanal ortam (virtual environment) olu\u015fturmak i\u00e7in gerekli ara\u00e7lar\u0131 kural\u0131m:<\/p>\n<pre><code class=\"language-bash\">sudo apt install python3-pip python3-dev build-essential libssl-dev libffi-dev -y<\/code><\/pre>\n<p>Bu komutlar, Python pip paket y\u00f6neticisini, Python geli\u015ftirme ba\u015fl\u0131klar\u0131n\u0131 (Flask ve Gunicorn&#8217;un baz\u0131 ba\u011f\u0131ml\u0131l\u0131klar\u0131 i\u00e7in gerekli olabilir), derleyici ara\u00e7lar\u0131n\u0131 ve SSL\/TLS ile ilgili k\u00fct\u00fcphaneleri kurar.<\/p>\n<p>G\u00fcvenlik amac\u0131yla, uygulaman\u0131z\u0131 \u00e7al\u0131\u015ft\u0131rmak i\u00e7in yeni bir kullan\u0131c\u0131 olu\u015ftural\u0131m. Bu, uygulaman\u0131z\u0131n root ayr\u0131cal\u0131klar\u0131yla \u00e7al\u0131\u015fmas\u0131n\u0131 engeller.<\/p>\n<pre><code class=\"language-bash\">sudo adduser ornekkullanici\nsudo usermod -aG sudo ornekkullanici<\/code><\/pre>\n<p><code>ornekkullanici<\/code> yerine kendi istedi\u011finiz kullan\u0131c\u0131 ad\u0131n\u0131 kullanabilirsiniz. \u015eimdi bu yeni kullan\u0131c\u0131ya ge\u00e7i\u015f yapal\u0131m:<\/p>\n<pre><code class=\"language-bash\">su - ornekkullanici<\/code><\/pre>\n<h3>Ad\u0131m 2: Flask Uygulamas\u0131n\u0131 Olu\u015fturma ve Sanal Ortam Kurulumu<\/h3>\n<p>Uygulamam\u0131z i\u00e7in bir dizin olu\u015ftural\u0131m ve bu dizine ge\u00e7i\u015f yapal\u0131m.<\/p>\n<pre><code class=\"language-bash\">mkdir ~\/myflaskapp\ncd ~\/myflaskapp<\/code><\/pre>\n<p>\u015eimdi bir Python sanal ortam\u0131 olu\u015ftural\u0131m ve etkinle\u015ftirelim. Sanal ortamlar, projenizin ba\u011f\u0131ml\u0131l\u0131klar\u0131n\u0131 sistem genelindeki Python paketlerinden izole etmenizi sa\u011flar.<\/p>\n<pre><code class=\"language-bash\">python3 -m venv venv\nsource venv\/bin\/activate<\/code><\/pre>\n<p>Sanal ortam etkinle\u015ftirildikten sonra, komut isteminizin ba\u015f\u0131nda <code>(venv)<\/code> ifadesini g\u00f6rmelisiniz. \u015eimdi Flask ve Gunicorn&#8217;u kural\u0131m:<\/p>\n<pre><code class=\"language-bash\">pip install Flask gunicorn<\/code><\/pre>\n<p>Bu ba\u011f\u0131ml\u0131l\u0131klar\u0131 <code>requirements.txt<\/code> dosyas\u0131na kaydedelim:<\/p>\n<pre><code class=\"language-bash\">pip freeze > requirements.txt<\/code><\/pre>\n<p>\u015eimdi basit bir Flask uygulamas\u0131 olu\u015ftural\u0131m. <code>wsgi.py<\/code> ad\u0131nda bir dosya olu\u015fturun:<\/p>\n<pre><code class=\"language-bash\">nano wsgi.py<\/code><\/pre>\n<p>\u0130\u00e7ine a\u015fa\u011f\u0131daki kodu yap\u0131\u015ft\u0131r\u0131n:<\/p>\n<pre><code class=\"language-python\">from flask import Flask\n\napp = Flask(__name__)\n\n@app.route('\/')\ndef hello():\n    return 'Merhaba, Flask ve Gunicorn ile Nginx \u00fczerinden yay\u0131nlan\u0131yorum!'\n\nif __name__ == '__main__':\n    app.run(debug=True)<\/code><\/pre>\n<p>Dosyay\u0131 kaydedip kapat\u0131n (CTRL+O, Enter, CTRL+X).<\/p>\n<p>Uygulaman\u0131z\u0131n do\u011fru \u00e7al\u0131\u015ft\u0131\u011f\u0131ndan emin olmak i\u00e7in Gunicorn ile test edelim:<\/p>\n<pre><code class=\"language-bash\">gunicorn --bind 0.0.0.0:5000 wsgi:app<\/code><\/pre>\n<p>Bu komut, Gunicorn&#8217;un uygulaman\u0131z\u0131 5000 numaral\u0131 port \u00fczerinden t\u00fcm aray\u00fczlerde dinlemesini sa\u011flar. Taray\u0131c\u0131n\u0131zdan <code>http:\/\/SUNUCU_IP_ADRESINIZ:5000<\/code> adresine giderek uygulaman\u0131z\u0131n \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131 do\u011frulayabilirsiniz. Testi tamamlad\u0131ktan sonra <code>CTRL+C<\/code> ile Gunicorn&#8217;u durdurabilirsiniz.<\/p>\n<p>Bu noktada, Gunicorn&#8217;u bir sistem servisi olarak yap\u0131land\u0131rmam\u0131z gerekiyor ki sunucu yeniden ba\u015flad\u0131\u011f\u0131nda otomatik olarak ba\u015flas\u0131n ve arka planda \u00e7al\u0131\u015fs\u0131n.<\/p>\n<h3>Ad\u0131m 3: Gunicorn&#8217;u Systemd Servisi Olarak Yap\u0131land\u0131rma<\/h3>\n<p>Sanal ortamdan \u00e7\u0131k\u0131n:<\/p>\n<pre><code class=\"language-bash\">deactivate<\/code><\/pre>\n<p>\u015eimdi Gunicorn i\u00e7in bir Systemd servis dosyas\u0131 olu\u015ftural\u0131m. Bu dosya, Gunicorn&#8217;un nas\u0131l \u00e7al\u0131\u015ft\u0131r\u0131laca\u011f\u0131n\u0131 ve y\u00f6netilece\u011fini tan\u0131mlayacakt\u0131r.<\/p>\n<pre><code class=\"language-bash\">sudo nano \/etc\/systemd\/system\/myflaskapp.service<\/code><\/pre>\n<p>A\u015fa\u011f\u0131daki i\u00e7eri\u011fi dosyaya yap\u0131\u015ft\u0131r\u0131n. <code>ornekkullanici<\/code> yerine kendi kullan\u0131c\u0131 ad\u0131n\u0131z\u0131, <code>\/home\/ornekkullanici\/myflaskapp<\/code> yerine ise uygulaman\u0131z\u0131n yolunu g\u00fcncellemeyi unutmay\u0131n.<\/p>\n<pre><code class=\"language-ini\">[Unit]\nDescription=Gunicorn instance to serve myflaskapp\nAfter=network.target\n\n[Service]\nUser=ornekkullanici\nGroup=www-data\nWorkingDirectory=\/home\/ornekkullanici\/myflaskapp\nExecStart=\/home\/ornekkullanici\/myflaskapp\/venv\/bin\/gunicorn --workers 3 --bind unix:\/home\/ornekkullanici\/myflaskapp\/myflaskapp.sock -m 007 wsgi:app\nExecReload=\/bin\/kill -s HUP $MAINPID\nKillMode=mixed\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target<\/code><\/pre>\n<p><strong>A\u00e7\u0131klamalar:<\/strong><\/p>\n<p>*   <strong><code>Description<\/code><\/strong>: Servisin k\u0131sa a\u00e7\u0131klamas\u0131.<br \/>\n*   <strong><code>After=network.target<\/code><\/strong>: Servisin a\u011f ba\u011flant\u0131s\u0131 kurulduktan sonra ba\u015flamas\u0131n\u0131 sa\u011flar.<br \/>\n*   <strong><code>User<\/code><\/strong>: Gunicorn s\u00fcrecinin hangi kullan\u0131c\u0131 alt\u0131nda \u00e7al\u0131\u015faca\u011f\u0131n\u0131 belirtir. Uygulama klas\u00f6r\u00fcn\u00fcz\u00fcn sahibini kullan\u0131n.<br \/>\n*   <strong><code>Group<\/code><\/strong>: Gunicorn s\u00fcrecinin hangi grup alt\u0131nda \u00e7al\u0131\u015faca\u011f\u0131n\u0131 belirtir. <code>www-data<\/code> grubu, Nginx&#8217;in de eri\u015febilece\u011fi ortak bir gruptur. Uygulama klas\u00f6r\u00fcn\u00fcze <code>www-data<\/code> grubunun eri\u015fimini sa\u011flaman\u0131z gerekebilir (<code>sudo chown -R ornekkullanici:www-data \/home\/ornekkullanici\/myflaskapp<\/code> ve <code>sudo chmod -R g+rwx \/home\/ornekkullanici\/myflaskapp<\/code>).<br \/>\n*   <strong><code>WorkingDirectory<\/code><\/strong>: Uygulaman\u0131z\u0131n k\u00f6k dizini.<br \/>\n*   <strong><code>ExecStart<\/code><\/strong>: Gunicorn&#8217;u ba\u015flatmak i\u00e7in \u00e7al\u0131\u015ft\u0131r\u0131lacak komut.<br \/>\n    <em>   <code>--workers 3<\/code>: Gunicorn&#8217;un 3 i\u015f\u00e7i s\u00fcreci ile \u00e7al\u0131\u015fmas\u0131n\u0131 sa\u011flar. Bu de\u011feri sunucunuzun CPU \u00e7ekirdek say\u0131s\u0131na g\u00f6re ayarlayabilirsiniz (genellikle <code>2 <\/em> CPU_\u00c7EK\u0130RDE\u011e\u0130 + 1<\/code> form\u00fcl\u00fc \u00f6nerilir).<br \/>\n    *   <code>--bind unix:\/home\/ornekkullanici\/myflaskapp\/myflaskapp.sock<\/code>: Gunicorn&#8217;un bir TCP portu yerine bir Unix soketi \u00fczerinden dinlemesini sa\u011flar. Bu, Nginx ile yerel ileti\u015fim i\u00e7in daha h\u0131zl\u0131 ve g\u00fcvenli bir y\u00f6ntemdir.<br \/>\n    *   <code>-m 007<\/code>: Soket dosyas\u0131 i\u00e7in izinleri ayarlar, b\u00f6ylece Nginx bu sokete eri\u015febilir.<br \/>\n    *   <code>wsgi:app<\/code>: <code>wsgi.py<\/code> dosyas\u0131ndaki <code>app<\/code> adl\u0131 Flask uygulamas\u0131n\u0131 belirtir.<br \/>\n*   <strong><code>ExecReload<\/code><\/strong>: Gunicorn&#8217;u yeniden y\u00fcklemek i\u00e7in komut.<br \/>\n*   <strong><code>Restart=on-failure<\/code><\/strong>: Gunicorn s\u00fcreci bir hata nedeniyle durursa otomatik olarak yeniden ba\u015flat\u0131l\u0131r.<br \/>\n*   <strong><code>WantedBy=multi-user.target<\/code><\/strong>: Bu servisin \u00e7ok kullan\u0131c\u0131l\u0131 sistem ba\u015flat\u0131ld\u0131\u011f\u0131nda etkinle\u015ftirilmesini sa\u011flar.<\/p>\n<p>Dosyay\u0131 kaydedin ve kapat\u0131n. \u015eimdi Systemd&#8217;yi yeni servisi tan\u0131mak i\u00e7in yeniden y\u00fckleyin:<\/p>\n<pre><code class=\"language-bash\">sudo systemctl daemon-reload<\/code><\/pre>\n<p>Gunicorn servisini ba\u015flat\u0131n ve sunucu a\u00e7\u0131l\u0131\u015f\u0131nda otomatik ba\u015flamas\u0131 i\u00e7in etkinle\u015ftirin:<\/p>\n<pre><code class=\"language-bash\">sudo systemctl start myflaskapp\nsudo systemctl enable myflaskapp<\/code><\/pre>\n<p>Servisin durumunu kontrol edin:<\/p>\n<pre><code class=\"language-bash\">sudo systemctl status myflaskapp<\/code><\/pre>\n<p>\u00c7\u0131kt\u0131da <code>active (running)<\/code> ibaresini g\u00f6rmelisiniz. Ayr\u0131ca, Gunicorn&#8217;un soket dosyas\u0131n\u0131 olu\u015fturup olu\u015fturmad\u0131\u011f\u0131n\u0131 da kontrol edebilirsiniz:<\/p>\n<pre><code class=\"language-bash\">ls -l \/home\/ornekkullanici\/myflaskapp\/myflaskapp.sock<\/code><\/pre>\n<p>Bu dosyan\u0131n <code>www-data<\/code> grubu taraf\u0131ndan okunabilir ve yaz\u0131labilir olmas\u0131 gerekmektedir. E\u011fer yetki sorunlar\u0131 ya\u015farsan\u0131z, uygulama dizininin ve soket dosyas\u0131n\u0131n sahiplik ve izinlerini kontrol edin.<\/p>\n<pre><code class=\"language-bash\">sudo chown -R ornekkullanici:www-data \/home\/ornekkullanici\/myflaskapp\nsudo chmod -R g+rw \/home\/ornekkullanici\/myflaskapp<\/code><\/pre>\n<h3>Ad\u0131m 4: Nginx&#8217;i Kurma ve Yap\u0131land\u0131rma<\/h3>\n<p>Gunicorn art\u0131k Flask uygulaman\u0131z\u0131 bir Unix soketi \u00fczerinden dinliyor. \u015eimdi Nginx&#8217;i kurup yap\u0131land\u0131rarak gelen HTTP isteklerini bu sokete y\u00f6nlendirelim.<\/p>\n<p>Nginx&#8217;i kural\u0131m:<\/p>\n<pre><code class=\"language-bash\">sudo apt install nginx -y<\/code><\/pre>\n<p>Kurulumdan sonra Nginx servisi otomatik olarak ba\u015flayacakt\u0131r. G\u00fcvenlik duvar\u0131n\u0131 (UFW) yap\u0131land\u0131rarak Nginx&#8217;e gelen HTTP (ve ileride HTTPS) trafi\u011fine izin verelim:<\/p>\n<pre><code class=\"language-bash\">sudo ufw allow 'Nginx HTTP'\nsudo ufw allow 'Nginx HTTPS'\nsudo ufw allow 'OpenSSH'\nsudo ufw enable<\/code><\/pre>\n<p><code>sudo ufw status<\/code> komutu ile firewall durumunu kontrol edebilirsiniz.<\/p>\n<p>\u015eimdi Flask uygulaman\u0131z i\u00e7in bir Nginx sunucu blo\u011fu (server block) yap\u0131land\u0131rma dosyas\u0131 olu\u015ftural\u0131m.<\/p>\n<pre><code class=\"language-bash\">sudo nano \/etc\/nginx\/sites-available\/myflaskapp<\/code><\/pre>\n<p>A\u015fa\u011f\u0131daki i\u00e7eri\u011fi dosyaya yap\u0131\u015ft\u0131r\u0131n. <code>ornekuygulama.com<\/code> ve <code>www.ornekuygulama.com<\/code> yerine kendi alan ad\u0131n\u0131z\u0131 veya sunucunuzun IP adresini kullan\u0131n. E\u011fer alan ad\u0131n\u0131z yoksa, <code>server_name<\/code> sat\u0131r\u0131n\u0131 <code>server_name SUNUCU_IP_ADRESINIZ;<\/code> olarak de\u011fi\u015ftirebilirsiniz.<\/p>\n<pre><code class=\"language-nginx\">server {\n    listen 80;\n    server_name ornekuygulama.com www.ornekuygulama.com;\n\n    location \/ {\n        include proxy_params;\n        proxy_pass http:\/\/unix:\/home\/ornekkullanici\/myflaskapp\/myflaskapp.sock;\n    }\n\n    location \/static {\n        alias \/home\/ornekkullanici\/myflaskapp\/static;\n    }\n}<\/code><\/pre>\n<p><strong>A\u00e7\u0131klamalar:<\/strong><\/p>\n<p>*   <strong><code>listen 80<\/code><\/strong>: Nginx&#8217;in 80 numaral\u0131 HTTP portundan gelen istekleri dinlemesini sa\u011flar.<br \/>\n*   <strong><code>server_name<\/code><\/strong>: Bu sunucu blo\u011funun hangi alan adlar\u0131 i\u00e7in etkin olaca\u011f\u0131n\u0131 belirtir.<br \/>\n*   <strong><code>location \/<\/code><\/strong>: T\u00fcm gelen istekleri yakalar ve Gunicorn&#8217;a y\u00f6nlendirir.<br \/>\n    *   <strong><code>include proxy_params<\/code><\/strong>: Nginx&#8217;in ters proxy olarak \u00e7al\u0131\u015fmas\u0131 i\u00e7in gerekli standart ba\u015fl\u0131klar\u0131 (host, X-Real-IP vb.) ekler.<br \/>\n    *   <strong><code>proxy_pass http:\/\/unix:\/home\/ornekkullanici\/myflaskapp\/myflaskapp.sock<\/code><\/strong>: Gelen istekleri Gunicorn&#8217;un dinledi\u011fi Unix soketine y\u00f6nlendirir.<br \/>\n*   <strong><code>location \/static<\/code><\/strong>: E\u011fer Flask uygulaman\u0131z statik dosyalar (CSS, JS, resimler) sunuyorsa, bu blok Nginx&#8217;in bu dosyalar\u0131 do\u011frudan sunmas\u0131n\u0131 sa\u011flar. Bu, performans\u0131 art\u0131r\u0131r \u00e7\u00fcnk\u00fc Nginx statik dosyalar\u0131 Gunicorn&#8217;dan daha verimli sunar. <code>static<\/code> dizininin uygulaman\u0131z\u0131n k\u00f6k dizininde olmas\u0131 gerekti\u011fini unutmay\u0131n. E\u011fer statik dosyan\u0131z yoksa bu blo\u011fu eklemeniz gerekmez.<\/p>\n<p>Dosyay\u0131 kaydedin ve kapat\u0131n. \u015eimdi bu yap\u0131land\u0131rma dosyas\u0131n\u0131 <code>sites-enabled<\/code> dizinine sembolik bir ba\u011flant\u0131 (symlink) olu\u015fturarak etkinle\u015ftirelim:<\/p>\n<pre><code class=\"language-bash\">sudo ln -s \/etc\/nginx\/sites-available\/myflaskapp \/etc\/nginx\/sites-enabled<\/code><\/pre>\n<p>Varsay\u0131lan Nginx yap\u0131land\u0131rma dosyas\u0131n\u0131 devre d\u0131\u015f\u0131 b\u0131rakal\u0131m ki bizim yap\u0131land\u0131rmam\u0131z \u00e7ak\u0131\u015fmas\u0131n:<\/p>\n<pre><code class=\"language-bash\">sudo unlink \/etc\/nginx\/sites-enabled\/default<\/code><\/pre>\n<p>Nginx yap\u0131land\u0131rmas\u0131n\u0131n s\u00f6zdizimini kontrol edin:<\/p>\n<pre><code class=\"language-bash\">sudo nginx -t<\/code><\/pre>\n<p>E\u011fer <code>test is successful<\/code> mesaj\u0131n\u0131 al\u0131rsan\u0131z, Nginx&#8217;i yeniden ba\u015flat\u0131n:<\/p>\n<pre><code class=\"language-bash\">sudo systemctl restart nginx<\/code><\/pre>\n<p>\u015eimdi taray\u0131c\u0131n\u0131zdan alan ad\u0131n\u0131za veya sunucunuzun IP adresine giderek uygulaman\u0131z\u0131n \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131 do\u011frulayabilirsiniz. Flask uygulaman\u0131z\u0131n Nginx \u00fczerinden yay\u0131nland\u0131\u011f\u0131n\u0131 g\u00f6rmelisiniz.<\/p>\n<h3>Ad\u0131m 5: Let&#8217;s Encrypt ile SSL\/TLS Kurulumu (\u0130ste\u011fe Ba\u011fl\u0131 ama \u015eiddetle \u00d6nerilir)<\/h3>\n<p>Uygulaman\u0131z\u0131n g\u00fcvenli\u011fini art\u0131rmak i\u00e7in HTTPS kullanmak \u00f6nemlidir. Let&#8217;s Encrypt, \u00fccretsiz SSL\/TLS sertifikalar\u0131 sa\u011flar ve Certbot arac\u0131 ile kolayca kurulabilir.<\/p>\n<p>Certbot&#8217;u ve Nginx eklentisini kural\u0131m:<\/p>\n<pre><code class=\"language-bash\">sudo apt install certbot python3-certbot-nginx -y<\/code><\/pre>\n<p>\u015eimdi Certbot&#8217;u \u00e7al\u0131\u015ft\u0131rarak SSL sertifikas\u0131 alal\u0131m. <code>ornekuygulama.com<\/code> ve <code>www.ornekuygulama.com<\/code> yerine kendi alan adlar\u0131n\u0131z\u0131 girin.<\/p>\n<pre><code class=\"language-bash\">sudo certbot --nginx -d ornekuygulama.com -d www.ornekuygulama.com<\/code><\/pre>\n<p>Certbot size birka\u00e7 soru soracakt\u0131r:<\/p>\n<p>1.  E-posta adresinizi girin.<br \/>\n2.  Hizmet \u015fartlar\u0131n\u0131 kabul edin.<br \/>\n3.  E-posta adresinizi EFF ile payla\u015fmak isteyip istemedi\u011finizi belirtin (iste\u011fe ba\u011fl\u0131).<br \/>\n4.  Nginx yap\u0131land\u0131rman\u0131z\u0131 otomatik olarak HTTPS&#8217;ye y\u00f6nlendirip y\u00f6nlendirmeyece\u011fini sorun (genellikle <code>2: Redirect<\/code> se\u00e7ene\u011fi \u00f6nerilir).<\/p>\n<p>Ba\u015far\u0131l\u0131 bir kurulumdan sonra, Certbot Nginx yap\u0131land\u0131rman\u0131z\u0131 otomatik olarak g\u00fcncelleyecek ve HTTP isteklerini HTTPS&#8217;ye y\u00f6nlendirecektir. Art\u0131k taray\u0131c\u0131n\u0131zdan <code>https:\/\/ornekuygulama.com<\/code> adresine giderek uygulaman\u0131z\u0131n g\u00fcvenli bir ba\u011flant\u0131 \u00fczerinden \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131 do\u011frulayabilirsiniz.<\/p>\n<p>Certbot sertifikalar\u0131 otomatik olarak yenilemek i\u00e7in bir <code>cron<\/code> i\u015fi de kurar. Yenileme mekanizmas\u0131n\u0131n \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131 test edebilirsiniz:<\/p>\n<pre><code class=\"language-bash\">sudo certbot renew --dry-run<\/code><\/pre>\n<p>E\u011fer herhangi bir hata almazsan\u0131z, otomatik yenileme do\u011fru \u015fekilde \u00e7al\u0131\u015f\u0131yor demektir.<\/p>\n<h3>Ad\u0131m 6: Uygulamay\u0131 Y\u00f6netme ve G\u00fcncelleme<\/h3>\n<p>Uygulaman\u0131z art\u0131k yay\u0131nda. Peki uygulamay\u0131 nas\u0131l y\u00f6netecek veya g\u00fcncelleyeceksiniz?<\/p>\n<h4>Gunicorn Servisini Y\u00f6netme<\/h4>\n<p>*   <strong>Durum kontrol\u00fc:<\/strong> <code>sudo systemctl status myflaskapp<\/code><br \/>\n*   <strong>Ba\u015flatma:<\/strong> <code>sudo systemctl start myflaskapp<\/code><br \/>\n*   <strong>Durdurma:<\/strong> <code>sudo systemctl stop myflaskapp<\/code><br \/>\n*   <strong>Yeniden ba\u015flatma:<\/strong> <code>sudo systemctl restart myflaskapp<\/code><\/p>\n<h4>Nginx Servisini Y\u00f6netme<\/h4>\n<p>*   <strong>Durum kontrol\u00fc:<\/strong> <code>sudo systemctl status nginx<\/code><br \/>\n*   <strong>Ba\u015flatma:<\/strong> <code>sudo systemctl start nginx<\/code><br \/>\n*   <strong>Durdurma:<\/strong> <code>sudo systemctl stop nginx<\/code><br \/>\n*   <strong>Yeniden ba\u015flatma:<\/strong> <code>sudo systemctl restart nginx<\/code><br \/>\n*   <strong>Yap\u0131land\u0131rmay\u0131 yeniden y\u00fckleme (servisi durdurmadan):<\/strong> <code>sudo systemctl reload nginx<\/code><\/p>\n<h4>Uygulama G\u00fcncelleme<\/h4>\n<p>1.  <strong>Kod de\u011fi\u015fiklikleri:<\/strong> Uygulaman\u0131z\u0131n kodunda (<code>wsgi.py<\/code> veya di\u011fer Python dosyalar\u0131) de\u011fi\u015fiklikler yap\u0131n.<br \/>\n2.  <strong>Ba\u011f\u0131ml\u0131l\u0131klar\u0131 g\u00fcncelleme (gerekirse):<\/strong> E\u011fer <code>requirements.txt<\/code> dosyan\u0131zda de\u011fi\u015fiklik varsa, sanal ortam\u0131 etkinle\u015ftirip ba\u011f\u0131ml\u0131l\u0131klar\u0131 yeniden kurun:<\/p>\n<pre><code class=\"language-bash\">cd ~\/myflaskapp\n    source venv\/bin\/activate\n    pip install -r requirements.txt\n    deactivate<\/code><\/pre>\n<p>3.  <strong>Gunicorn&#8217;u yeniden ba\u015flatma:<\/strong> De\u011fi\u015fikliklerin etkili olmas\u0131 i\u00e7in Gunicorn servisini yeniden ba\u015flat\u0131n:<\/p>\n<pre><code class=\"language-bash\">sudo systemctl restart myflaskapp<\/code><\/pre>\n<h4>Loglar\u0131 Kontrol Etme<\/h4>\n<p>Sorun giderme i\u00e7in loglar\u0131 kontrol etmek \u00f6nemlidir.<\/p>\n<p>*   <strong>Gunicorn loglar\u0131:<\/strong> <code>sudo journalctl -u myflaskapp<\/code><br \/>\n*   <strong>Nginx eri\u015fim loglar\u0131:<\/strong> <code>sudo tail -f \/var\/log\/nginx\/access.log<\/code><br \/>\n*   <strong>Nginx hata loglar\u0131:<\/strong> <code>sudo tail -f \/var\/log\/nginx\/error.log<\/code><\/p>\n<h3>Sonu\u00e7<\/h3>\n<p>Bu kapsaml\u0131 rehberde, Flask uygulamalar\u0131n\u0131z\u0131 Ubuntu 18.04 sunucusu \u00fczerinde Gunicorn ve Nginx kullanarak g\u00fcvenli, performansl\u0131 ve \u00f6l\u00e7eklenebilir bir \u015fekilde nas\u0131l yay\u0131nlayaca\u011f\u0131n\u0131z\u0131 ad\u0131m ad\u0131m \u00f6\u011frendiniz. Flask&#8217;\u0131n dahili geli\u015ftirme sunucusunun aksine, bu kurulum \u00fcretim ortamlar\u0131 i\u00e7in tasarlanm\u0131\u015ft\u0131r ve uygulaman\u0131z\u0131n ger\u00e7ek d\u00fcnya trafi\u011fiyle ba\u015fa \u00e7\u0131kmas\u0131n\u0131 sa\u011flar.<\/p>\n<p>\u00d6zetle, s\u00fcre\u00e7 \u015fu ad\u0131mlar\u0131 i\u00e7eriyordu:<\/p>\n<p>1.  <strong>Sunucu Haz\u0131rl\u0131\u011f\u0131:<\/strong> Ubuntu 18.04&#8217;\u00fc g\u00fcncelledik, gerekli Python ara\u00e7lar\u0131n\u0131 kurduk ve uygulama i\u00e7in ayr\u0131 bir kullan\u0131c\u0131 olu\u015fturduk.<br \/>\n2.  <strong>Flask Uygulamas\u0131 ve Sanal Ortam:<\/strong> Uygulama dizini olu\u015fturduk, sanal ortam\u0131 yap\u0131land\u0131rd\u0131k ve basit bir Flask uygulamas\u0131 (<code>wsgi.py<\/code>) yazd\u0131k.<br \/>\n3.  <strong>Gunicorn Kurulumu:<\/strong> Gunicorn&#8217;u kurduk ve Flask uygulamas\u0131n\u0131 bir Unix soketi \u00fczerinden dinlemesi i\u00e7in bir Systemd servisi olarak yap\u0131land\u0131rd\u0131k.<br \/>\n4.  <strong>Nginx Kurulumu:<\/strong> Nginx&#8217;i kurduk, g\u00fcvenlik duvar\u0131n\u0131 yap\u0131land\u0131rd\u0131k ve gelen web isteklerini Gunicorn&#8217;a y\u00f6nlendiren bir sunucu blo\u011fu olu\u015fturduk.<br \/>\n5.  <strong>SSL\/TLS G\u00fcvenli\u011fi:<\/strong> Let&#8217;s Encrypt ve Certbot kullanarak uygulaman\u0131za \u00fccretsiz SSL sertifikas\u0131 ekledik ve HTTPS&#8217;ye y\u00f6nlendirme sa\u011flad\u0131k.<br \/>\n6.  <strong>Y\u00f6netim:<\/strong> Uygulaman\u0131z\u0131 nas\u0131l g\u00fcncelleyece\u011finizi ve servisleri nas\u0131l y\u00f6netece\u011finizi ele ald\u0131k.<\/p>\n<p>Bu kurulum, web uygulaman\u0131z\u0131n temelini olu\u015fturur. Daha karma\u015f\u0131k uygulamalar i\u00e7in veritaban\u0131 entegrasyonu (PostgreSQL, MySQL vb.), arka plan g\u00f6revleri (Celery), izleme ve s\u00fcrekli entegrasyon\/s\u00fcrekli teslimat (CI\/CD) gibi ek ad\u0131mlar gerekebilir. Ancak bu makaledeki ad\u0131mlar\u0131 takip ederek Flask uygulaman\u0131z\u0131 g\u00fcvenle ve verimli bir \u015fekilde \u00fcretim ortam\u0131na ta\u015f\u0131yabilirsiniz.<\/body><\/p>\n","protected":false},"excerpt":{"rendered":"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama\nFlask, Python tabanl\u0131 hafif ve esnek bir web \u00e7at\u0131s\u0131d\u0131r (web frame","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[1468],"tags":[],"class_list":{"0":"post-32647","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-ubuntu","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama\" \/>\n<meta property=\"og:description\" content=\"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama Flask, Python tabanl\u0131 hafif ve esnek bir web \u00e7at\u0131s\u0131d\u0131r (web frame\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2025-10-24T04:40:45+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama\",\"datePublished\":\"2025-10-24T04:40:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/\"},\"wordCount\":2309,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"articleSection\":[\"Ubuntu\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/#respond\"]}],\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/\",\"name\":\"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2025-10-24T04:40:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/","og_locale":"tr_TR","og_type":"article","og_title":"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama","og_description":"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama Flask, Python tabanl\u0131 hafif ve esnek bir web \u00e7at\u0131s\u0131d\u0131r (web frame","og_url":"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2025-10-24T04:40:45+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"14 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama","datePublished":"2025-10-24T04:40:45+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/"},"wordCount":2309,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"articleSection":["Ubuntu"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/#respond"]}],"copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/","url":"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/","name":"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2025-10-24T04:40:45+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/flask-uygulamalarini-gunicorn-ve-nginx-ile-ubuntu-18-04-uzerinde-yayinlama\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Flask Uygulamalar\u0131n\u0131 Gunicorn ve Nginx ile Ubuntu 18.04 \u00dczerinde Yay\u0131nlama"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/32647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=32647"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/32647\/revisions"}],"predecessor-version":[{"id":32648,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/32647\/revisions\/32648"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=32647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=32647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=32647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}