Nginx
Bu makale, LeaderOs'u nginx web sunucusu ile nasıl kurabileceğinizi açıklamaktadır.
Kurulum işlemine başlamadan önce, alan adı sunucularınızın/DNS'lerinizin yapılandırıldığından emin olun. Aksi takdirde, web sitesine erişemezsiniz. DNS yönetimi için Cloudflare kullanmanızı öneririz.
Cloudflare DNS Kurulumu Nasıl Yapılır?
Otomatik Kurulum
Bu komutu sadece yeni kurulum için kullanın! Eğer yeni bir kurulum değilse, manuel olarak yükleyin.
Kurulum komut dosyasını indirin.
wget https://installer.leaderos.com.tr/nginx.sh
Komut dosyasını çalıştırılabilir hale getirin.
chmod +x nginx.sh
Komut dosyasını çalıştırın.
./nginx.sh
Manuel Kurulum
Bu yazı Ubuntu ve Debian için hazırlanmıştır.
Yerel paket dizinini en son yukarı akış değişikliklerini yansıtacak şekilde güncelleyerek başlayalım:
sudo apt update -y
Nginx Kurulumu
nginx paketini yükleyin:
sudo apt install nginx -y
systemctl start
komutu ile nginx'in çalıştığından emin olun:
sudo systemctl start nginx
Ayrıca, gösterildiği gibi nginx'in sistem başlangıcında her seferinde başlamasını etkinleştirmeyi düşünün.
sudo systemctl enable nginx
80 ve 443 güvenlik duvarı bağlantı noktalarını etkinleştirdiğinizden emin olun.
Nginx Sunucu Bloklarını Kurma
Nginx web sunucusunu kullanırken, yapılandırma ayrıntılarını kapsüllemek ve tek bir sunucudan birden fazla alan adını barındırmak için sunucu blokları (Apache'deki sanal ana bilgisayarlara benzer) kullanılabilir. Biz your_domain.com adında bir alan adı kuracağız, ancak siz bunu kendi alan adınızla değiştirmelisiniz.
your_domain.com için dizin oluşturun.
sudo mkdir -p /var/www/your_domain.com/html
Ardından, www-data ile dizinin sahipliğini atayın.
sudo chown -R www-data:www-data /var/www/your_domain.com/html
Nginx'i Yapılandırma
Nginx'in bu içeriği sunabilmesi için doğru yönergeleri içeren bir sunucu bloğu oluşturmak gerekir. Varsayılan yapılandırma dosyasını doğrudan değiştirmek yerine, /etc/nginx/sites-available/your_domain.com
adresinde yeni bir tane oluşturalım:
sudo nano /etc/nginx/sites-available/your_domain.com
Varsayılana benzer, ancak yeni dizinimiz ve alan adımız için güncellenmiş olan aşağıdaki yapılandırma bloğunu yapıştırın:
server {
listen 80;
listen [::]:80;
root /var/www/your_domain.com/html;
index index.html index.htm index.nginx-debian.html;
server_name your_domain.com www.your_domain.com;
client_max_body_size 128M;
location ~ (^|/)apps/api/includes(/|$) {
return 403;
}
location ~ (^|/)(apps/main|apps/dashboard|apps/install|apps/update)/private(/|$) {
return 403;
}
location ~ \.(ini|log|sh|sql|htaccess) {
deny all;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
error_page 404 /apps/main/index.php?route=404;
error_page 403 /apps/main/index.php?route=404;
location ~ "(^|/)apps/api/includes(/|$)" {
deny all;
}
location ~ "(^|/)(apps/main|apps/dashboard|apps/install|apps/update)/private(/|$)" {
deny all;
}
location ~ "(^|/)apps/main/themes/(.*)/private(/|$)" {
deny all;
}
location ~ "(^|/)apps/main/themes/(.*)/theme.json(/|$)" {
deny all;
}
rewrite ^/robots.txt(/?)$ /robots.php last;
rewrite ^/sitemap.xml(/?)$ /sitemap.php last;
rewrite ^/install(/?)$ /apps/install/index.php last;
rewrite ^/api/auth(/?)$ /apps/api/auth.php last;
rewrite ^/(/?)$ /apps/main/index.php?route=home last;
rewrite ^/rules(/?)$ /apps/main/index.php?route=rules last;
rewrite ^/staffs(/?)$ /apps/main/index.php?route=staffs last;
rewrite ^/vote(/?)$ /apps/main/index.php?route=vote last;
rewrite ^/download(/?)$ /apps/main/index.php?route=download last;
rewrite ^/download/([0-9]+)/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=download&id=$1&file=$2 last;
rewrite ^/player/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=player&id=$1 last;
rewrite ^/profile(/?)$ /apps/main/index.php?route=profile&target=profile&action=get last;
rewrite ^/profile/edit(/?)$ /apps/main/index.php?route=profile&target=profile&action=update last;
rewrite ^/profile/contact(/?)$ /apps/main/index.php?route=profile&target=profile&action=contact last;
rewrite ^/profile/change-password(/?)$ /apps/main/index.php?route=profile&target=profile&action=change-password last;
rewrite ^/login(/?)$ /apps/main/index.php?route=login last;
rewrite ^/register(/?)$ /apps/main/index.php?route=register last;
rewrite ^/recover-account(/?)$ /apps/main/index.php?route=recover last;
rewrite ^/recover-account/([0-9a-zA-Z-_]+)/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=recover&id=$1&token=$2 last;
rewrite ^/email-verification(/?)$ /apps/main/index.php?route=email-verification last;
rewrite ^/email-verification/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=email-verification&token=$1 last;
rewrite ^/verify(/?)$ /apps/main/index.php?route=tfa last;
rewrite ^/recover-verify(/?)$ /apps/main/index.php?route=tfa-recover last;
rewrite ^/recover-verify/([0-9a-zA-Z-_]+)/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=tfa-recover&id=$1&token=$2 last;
rewrite ^/logout(/?)$ /apps/main/public/ajax/logout.php last;
rewrite ^/credit/buy(/?)$ /apps/main/index.php?route=credit&target=credit&action=buy last;
rewrite ^/credit/buy/success(/?)$ /apps/main/index.php?route=credit&target=credit&action=alert&result=success last;
rewrite ^/credit/buy/error(/?)$ /apps/main/index.php?route=credit&target=credit&action=alert&result=error last;
rewrite ^/credit/send(/?)$ /apps/main/index.php?route=credit&target=credit&action=send last;
rewrite ^/credit/send/([0-9]+)(/?)$ /apps/main/index.php?route=credit&target=credit&action=send&id=$1 last;
rewrite ^/tebex/webhook(/?)$ /apps/main/public/ajax/tebex.php?action=webhook last;
rewrite ^/callback/([0-9a-zA-Z-_]+)(/?)$ /apps/main/public/ajax/process.php?api=$1 last;
rewrite ^/leaderboards(/?)$ /apps/main/index.php?route=leaderboards last;
rewrite ^/leaderboards/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=leaderboards&server=$1 last;
rewrite ^/store(/?)$ /apps/main/index.php?route=store&action=getAll last;
rewrite ^/store/products/([0-9]+)(/?)$ /apps/main/index.php?route=store&action=get&product=$1 last;
rewrite ^/store/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=store&action=get&server=$1 last;
rewrite ^/store/([0-9a-zA-Z-_]+)/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=store&action=get&server=$1&category=$2 last;
rewrite ^/support(/?)$ /apps/main/index.php?route=support&target=support&action=getAll last;
rewrite ^/support/create(/?)$ /apps/main/index.php?route=support&target=support&action=insert last;
rewrite ^/support/view/([0-9]+)(/?)$ /apps/main/index.php?route=support&target=support&action=get&id=$1 last;
rewrite ^/support/delete/([0-9]+)(/?)$ /apps/main/index.php?route=support&target=support&action=delete&id=$1 last;
rewrite ^/blog/([0-9]+)(/?)$ /apps/main/index.php?route=home&page=$1 last;
rewrite ^/categories/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=home&category=$1 last;
rewrite ^/categories/([0-9a-zA-Z-_]+)/([0-9]+)(/?)$ /apps/main/index.php?route=home&category=$1&page=$2 last;
rewrite ^/tags/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=home&tag=$1 last;
rewrite ^/tags/([0-9a-zA-Z-_]+)/([0-9]+)(/?)$ /apps/main/index.php?route=home&tag=$1&page=$2 last;
rewrite ^/posts/([0-9]+)/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=news&id=$1 last;
rewrite ^/pages/([0-9]+)/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=page&id=$1 last;
rewrite ^/maintenance(/?)$ /apps/main/index.php?route=maintenance last;
rewrite ^/games(/?)$ /apps/main/index.php?route=games&action=getAll last;
rewrite ^/games/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=games&action=get&game=$1 last;
rewrite ^/help(/?)$ /apps/main/index.php?route=help&action=getAll last;
rewrite ^/help/articles/([0-9]+)/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=help&action=getArticle&id=$1 last;
rewrite ^/help/topics/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=help&action=getTopic&category=$1 last;
rewrite ^/chest(/?)$ /apps/main/index.php?route=chest&target=chest&action=getAll last;
rewrite ^/chest/gift/([0-9]+)(/?)$ /apps/main/index.php?route=chest&target=chest&action=gift&id=$1 last;
rewrite ^/gift(/?)$ /apps/main/index.php?route=gift&target=gift&action=coupon last;
rewrite ^/gift/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=gift&target=gift&action=use&id=$1 last;
rewrite ^/fortune-wheel(/?)$ /apps/main/index.php?route=lottery last;
rewrite ^/fortune-wheel/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=lottery&lottery=$1 last;
rewrite ^/play(/?)$ /apps/main/index.php?route=play last;
rewrite ^/form/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=form&action=view&form=$1 last;
rewrite ^/form/view/([0-9]+)(/?)$ /apps/main/index.php?route=form&action=get&id=$1 last;
rewrite ^/help-bazaar(/?)$ /apps/main/index.php?route=manage-bazaar&action=help last;
rewrite ^/manage-bazaar(/?)$ /apps/main/index.php?route=manage-bazaar&action=getAll last;
rewrite ^/manage-bazaar/([0-9]+)(/?)$ /apps/main/index.php?route=manage-bazaar&action=sell&id=$1 last;
rewrite ^/bazaar(/?)$ /apps/main/index.php?route=bazaar&action=getAll last;
rewrite ^/bazaar/products/([0-9]+)(/?)$ /apps/main/index.php?route=bazaar&action=get&product=$1 last;
rewrite ^/bazaar/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=bazaar&action=get&server=$1 last;
rewrite ^/orders/view/([0-9]+)(/?)$ /apps/main/index.php?route=orders&action=get&id=$1 last;
rewrite ^/orders/success(/?)$ /apps/main/index.php?route=orders&action=alert&result=success last;
rewrite ^/orders/error(/?)$ /apps/main/index.php?route=orders&action=alert&result=error last;
rewrite ^/gaming-night(/?)$ /apps/main/index.php?route=gaming-night last;
rewrite ^/gaming-night/products/([0-9]+)(/?)$ /apps/main/index.php?route=gaming-night&action=get&product=$1 last;
rewrite ^/forum(/?)$ /apps/main/index.php?route=forum&target=categories&action=getAll last;
rewrite ^/forum/categories/([0-9]+)/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=forum&target=categories&action=get&id=$1 last;
rewrite ^/forum/categories/([0-9]+)/([0-9a-zA-Z-_]+)/([0-9]+)(/?)$ /apps/main/index.php?route=forum&target=categories&action=get&id=$1&page=$3 last;
rewrite ^/forum/threads/edit/([0-9]+)(/?)$ /apps/main/index.php?route=forum&target=threads&action=update&id=$1 last;
rewrite ^/forum/threads/pin/([0-9]+)(/?)$ /apps/main/index.php?route=forum&target=threads&action=pin&id=$1 last;
rewrite ^/forum/threads/lock/([0-9]+)(/?)$ /apps/main/index.php?route=forum&target=threads&action=lock&id=$1 last;
rewrite ^/forum/threads/delete/([0-9]+)(/?)$ /apps/main/index.php?route=forum&target=threads&action=delete&id=$1 last;
rewrite ^/forum/threads/create(/?)$ /apps/main/index.php?route=forum&target=threads&action=insert last;
rewrite ^/forum/threads/([0-9]+)/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=forum&target=threads&action=get&id=$1 last;
rewrite ^/forum/replies/edit/([0-9]+)(/?)$ /apps/main/index.php?route=forum&target=replies&action=update&id=$1 last;
rewrite ^/forum/replies/delete/([0-9]+)(/?)$ /apps/main/index.php?route=forum&target=replies&action=delete&id=$1 last;
rewrite ^/punishments(/?)$ /apps/main/index.php?route=punishments&target=home last;
rewrite ^/punishments/bans(/?)$ /apps/main/index.php?route=punishments&target=bans&action=getAll last;
rewrite ^/punishments/mutes(/?)$ /apps/main/index.php?route=punishments&target=mutes&action=getAll last;
rewrite ^/punishments/kicks(/?)$ /apps/main/index.php?route=punishments&target=kicks&action=getAll last;
rewrite ^/punishments/warnings(/?)$ /apps/main/index.php?route=punishments&target=warnings&action=getAll last;
rewrite ^/suggestions(/?)$ /apps/main/index.php?route=suggestions&target=suggestion&action=getAll last;
rewrite ^/suggestions/create(/?)$ /apps/main/index.php?route=suggestions&target=suggestion&action=insert last;
rewrite ^/suggestions/like/([0-9]+)(/?)$ /apps/main/index.php?route=suggestions&target=suggestion&action=like&id=$1 last;
rewrite ^/suggestions/dislike/([0-9]+)(/?)$ /apps/main/index.php?route=suggestions&target=suggestion&action=dislike&id=$1 last;
rewrite ^/suggestions/edit/([0-9]+)(/?)$ /apps/main/index.php?route=suggestions&target=suggestion&action=update&id=$1 last;
rewrite ^/suggestions/delete/([0-9]+)(/?)$ /apps/main/index.php?route=suggestions&target=suggestion&action=delete&id=$1 last;
rewrite ^/suggestions/([0-9]+)/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=suggestions&target=suggestion&action=get&id=$1 last;
rewrite ^/suggestions/categories/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=suggestions&target=category&action=get&slug=$1 last;
rewrite ^/suggestions/replies/edit/([0-9]+)(/?)$ /apps/main/index.php?route=suggestions&target=reply&action=update&id=$1 last;
rewrite ^/suggestions/replies/delete/([0-9]+)(/?)$ /apps/main/index.php?route=suggestions&target=reply&action=delete&id=$1 last;
rewrite ^/404(/?)$ /apps/main/index.php?route=404 last;
rewrite ^/checkout(/?)$ /apps/main/index.php?route=checkout last;
rewrite ^/applications/forms/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=application&action=apply&form=$1 last;
rewrite ^/applications/([0-9]+)(/?)$ /apps/main/index.php?route=application&action=get&id=$1 last;
rewrite ^/dashboard(/?)$ /apps/dashboard/index.php?route=home last;
rewrite ^/dashboard/stats(/?)$ /apps/dashboard/index.php?route=stats last;
rewrite ^/dashboard/error/([0-9]+)(/?)$ /apps/dashboard/index.php?route=home&alert=$1 last;
rewrite ^/OneSignalSDKWorker.js$ /apps/dashboard/public/assets/js/OneSignalSDKWorker.js last;
rewrite ^/OneSignalSDKUpdaterWorker.js$ /apps/dashboard/public/assets/js/OneSignalSDKUpdaterWorker.js last;
rewrite ^/dashboard/notifications(/?)$ /apps/dashboard/index.php?route=notifications last;
rewrite ^/dashboard/update(/?)$ /apps/dashboard/index.php?route=update last;
rewrite ^/dashboard/blog(/?)$ /apps/dashboard/index.php?route=news&target=news&action=getAll last;
rewrite ^/dashboard/blog/([0-9]+)(/?)$ /apps/dashboard/index.php?route=news&target=news&action=getAll&page=$1 last;
rewrite ^/dashboard/blog/create(/?)$ /apps/dashboard/index.php?route=news&target=news&action=insert last;
rewrite ^/dashboard/blog/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=news&target=news&action=update&id=$1 last;
rewrite ^/dashboard/blog/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=news&target=news&action=delete&id=$1 last;
rewrite ^/dashboard/blog/categories(/?)$ /apps/dashboard/index.php?route=news&target=category&action=getAll last;
rewrite ^/dashboard/blog/categories/create(/?)$ /apps/dashboard/index.php?route=news&target=category&action=insert last;
rewrite ^/dashboard/blog/categories/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=news&target=category&action=update&id=$1 last;
rewrite ^/dashboard/blog/categories/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=news&target=category&action=delete&id=$1 last;
rewrite ^/dashboard/blog/comments(/?)$ /apps/dashboard/index.php?route=news&target=comment&action=getAll last;
rewrite ^/dashboard/blog/comments/([0-9]+)(/?)$ /apps/dashboard/index.php?route=news&target=comment&action=getAll&page=$1 last;
rewrite ^/dashboard/blog/comments/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=news&target=comment&action=get&id=$1 last;
rewrite ^/dashboard/blog/comments/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=news&target=comment&action=delete&id=$1 last;
rewrite ^/dashboard/games(/?)$ /apps/dashboard/index.php?route=game&target=game&action=getAll last;
rewrite ^/dashboard/games/create(/?)$ /apps/dashboard/index.php?route=game&target=game&action=insert last;
rewrite ^/dashboard/games/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=game&target=game&action=update&id=$1 last;
rewrite ^/dashboard/games/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=game&target=game&action=delete&id=$1 last;
rewrite ^/dashboard/servers(/?)$ /apps/dashboard/index.php?route=server&target=server&action=getAll last;
rewrite ^/dashboard/servers/create(/?)$ /apps/dashboard/index.php?route=server&target=server&action=insert last;
rewrite ^/dashboard/servers/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=server&target=server&action=update&id=$1 last;
rewrite ^/dashboard/servers/view/([0-9]+)(/?)$ /apps/dashboard/index.php?route=server&target=server&action=get&id=$1 last;
rewrite ^/dashboard/servers/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=server&target=server&action=delete&id=$1 last;
rewrite ^/dashboard/store/products(/?)$ /apps/dashboard/index.php?route=store&target=product&action=getAll last;
rewrite ^/dashboard/store/products/create(/?)$ /apps/dashboard/index.php?route=store&target=product&action=insert last;
rewrite ^/dashboard/store/products/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=product&action=update&id=$1 last;
rewrite ^/dashboard/store/products/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=product&action=delete&id=$1 last;
rewrite ^/dashboard/store/categories(/?)$ /apps/dashboard/index.php?route=store&target=category&action=getAll last;
rewrite ^/dashboard/store/categories/create(/?)$ /apps/dashboard/index.php?route=store&target=category&action=insert last;
rewrite ^/dashboard/store/categories/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=category&action=update&id=$1 last;
rewrite ^/dashboard/store/categories/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=category&action=delete&id=$1 last;
rewrite ^/dashboard/store/credit-packages(/?)$ /apps/dashboard/index.php?route=store&target=credit-package&action=getAll last;
rewrite ^/dashboard/store/credit-packages/create(/?)$ /apps/dashboard/index.php?route=store&target=credit-package&action=insert last;
rewrite ^/dashboard/store/credit-packages/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=credit-package&action=update&id=$1 last;
rewrite ^/dashboard/store/credit-packages/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=credit-package&action=delete&id=$1 last;
rewrite ^/dashboard/store/coupons(/?)$ /apps/dashboard/index.php?route=store&target=coupon&action=getAll last;
rewrite ^/dashboard/store/coupons/create(/?)$ /apps/dashboard/index.php?route=store&target=coupon&action=insert last;
rewrite ^/dashboard/store/coupons/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=coupon&action=update&id=$1 last;
rewrite ^/dashboard/store/coupons/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=coupon&action=delete&id=$1 last;
rewrite ^/dashboard/store/credit/send(/?)$ /apps/dashboard/index.php?route=store&target=credit&action=send last;
rewrite ^/dashboard/store/credit/send/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=credit&action=send&id=$1 last;
rewrite ^/dashboard/store/chest-item/send(/?)$ /apps/dashboard/index.php?route=store&target=chest&action=send last;
rewrite ^/dashboard/store/chest-item/send/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=chest&action=send&id=$1 last;
rewrite ^/dashboard/store/bulk-discount(/?)$ /apps/dashboard/index.php?route=store&target=discount&action=update last;
rewrite ^/dashboard/store/chest-logs(/?)$ /apps/dashboard/index.php?route=store&target=chest-history&action=getAll last;
rewrite ^/dashboard/store/chest-logs/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=chest-history&action=getAll&page=$1 last;
rewrite ^/dashboard/store/chest-logs/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=chest-history&action=delete&id=$1 last;
rewrite ^/dashboard/store/coupon-logs(/?)$ /apps/dashboard/index.php?route=store&target=coupon-history&action=getAll last;
rewrite ^/dashboard/store/coupon-logs/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=coupon-history&action=getAll&page=$1 last;
rewrite ^/dashboard/store/coupon-logs/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=coupon-history&action=delete&id=$1 last;
rewrite ^/dashboard/store/credit-purchase-logs(/?)$ /apps/dashboard/index.php?route=store&target=credit-purchase-history&action=getAll last;
rewrite ^/dashboard/store/credit-purchase-logs/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=credit-purchase-history&action=getAll&page=$1 last;
rewrite ^/dashboard/store/credit-purchase-logs/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=credit-purchase-history&action=delete&id=$1 last;
rewrite ^/dashboard/store/credit-usage-logs(/?)$ /apps/dashboard/index.php?route=store&target=credit-usage-history&action=getAll last;
rewrite ^/dashboard/store/credit-usage-logs/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=credit-usage-history&action=getAll&page=$1 last;
rewrite ^/dashboard/store/credit-usage-logs/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=credit-usage-history&action=delete&id=$1 last;
rewrite ^/dashboard/store/store-logs(/?)$ /apps/dashboard/index.php?route=store&target=store-history&action=getAll last;
rewrite ^/dashboard/store/store-logs/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=store-history&action=getAll&page=$1 last;
rewrite ^/dashboard/store/store-logs/view/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=store-history&action=get&id=$1 last;
rewrite ^/dashboard/store/store-logs/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=store&target=store-history&action=delete&id=$1 last;
rewrite ^/dashboard/bazaar(/?)$ /apps/dashboard/index.php?route=bazaar&target=bazaar&action=getAll last;
rewrite ^/dashboard/bazaar/([0-9]+)(/?)$ /apps/dashboard/index.php?route=bazaar&target=bazaar&action=getAll&page=$1 last;
rewrite ^/dashboard/bazaar/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=bazaar&target=bazaar&action=update&id=$1 last;
rewrite ^/dashboard/bazaar/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=bazaar&target=bazaar&action=delete&id=$1 last;
rewrite ^/dashboard/bazaar/custom-item-images(/?)$ /apps/dashboard/index.php?route=bazaar&target=custom-item-images&action=getAll last;
rewrite ^/dashboard/bazaar/custom-item-images/create(/?)$ /apps/dashboard/index.php?route=bazaar&target=custom-item-images&action=insert last;
rewrite ^/dashboard/bazaar/custom-item-images/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=bazaar&target=custom-item-images&action=update&id=$1 last;
rewrite ^/dashboard/bazaar/custom-item-images/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=bazaar&target=custom-item-images&action=delete&id=$1 last;
rewrite ^/dashboard/bazaar/bazaar-logs(/?)$ /apps/dashboard/index.php?route=bazaar&target=bazaar-history&action=getAll last;
rewrite ^/dashboard/bazaar/bazaar-logs/([0-9]+)(/?)$ /apps/dashboard/index.php?route=bazaar&target=bazaar-history&action=getAll&page=$1 last;
rewrite ^/dashboard/bazaar/bazaar-logs/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=bazaar&target=bazaar-history&action=delete&id=$1 last;
rewrite ^/dashboard/fortune-wheel(/?)$ /apps/dashboard/index.php?route=lottery&target=lottery&action=getAll last;
rewrite ^/dashboard/fortune-wheel/create(/?)$ /apps/dashboard/index.php?route=lottery&target=lottery&action=insert last;
rewrite ^/dashboard/fortune-wheel/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=lottery&target=lottery&action=update&id=$1 last;
rewrite ^/dashboard/fortune-wheel/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=lottery&target=lottery&action=delete&id=$1 last;
rewrite ^/dashboard/fortune-wheel/logs(/?)$ /apps/dashboard/index.php?route=lottery&target=lottery-history&action=getAll last;
rewrite ^/dashboard/fortune-wheel/logs/([0-9]+)(/?)$ /apps/dashboard/index.php?route=lottery&target=lottery-history&action=getAll&page=$1 last;
rewrite ^/dashboard/fortune-wheel/logs/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=lottery&target=lottery-history&action=delete&id=$1 last;
rewrite ^/dashboard/gifts(/?)$ /apps/dashboard/index.php?route=gift&target=gift&action=getAll last;
rewrite ^/dashboard/gifts/create(/?)$ /apps/dashboard/index.php?route=gift&target=gift&action=insert last;
rewrite ^/dashboard/gifts/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=gift&target=gift&action=update&id=$1 last;
rewrite ^/dashboard/gifts/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=gift&target=gift&action=delete&id=$1 last;
rewrite ^/dashboard/gifts/logs(/?)$ /apps/dashboard/index.php?route=gift&target=gift-history&action=getAll last;
rewrite ^/dashboard/gifts/logs/([0-9]+)(/?)$ /apps/dashboard/index.php?route=gift&target=gift-history&action=getAll&page=$1 last;
rewrite ^/dashboard/gifts/logs/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=gift&target=gift-history&action=delete&id=$1 last;
rewrite ^/dashboard/users(/?)$ /apps/dashboard/index.php?route=account&target=account&action=getAll last;
rewrite ^/dashboard/users/([0-9]+)(/?)$ /apps/dashboard/index.php?route=account&target=account&action=getAll&page=$1 last;
rewrite ^/dashboard/users/create(/?)$ /apps/dashboard/index.php?route=account&target=account&action=insert last;
rewrite ^/dashboard/users/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=account&target=account&action=update&id=$1 last;
rewrite ^/dashboard/users/view/([0-9a-zA-Z-_]+)(/?)$ /apps/dashboard/index.php?route=account&target=account&action=get&id=$1 last;
rewrite ^/dashboard/users/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=account&target=account&action=delete&id=$1 last;
rewrite ^/dashboard/users/staffs(/?)$ /apps/dashboard/index.php?route=account&target=authorized&action=getAll last;
rewrite ^/dashboard/users/staffs/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=account&target=authorized&action=delete&id=$1 last;
rewrite ^/dashboard/roles(/?)$ /apps/dashboard/index.php?route=role&target=role&action=getAll last;
rewrite ^/dashboard/roles/create(/?)$ /apps/dashboard/index.php?route=role&target=role&action=insert last;
rewrite ^/dashboard/roles/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=role&target=role&action=update&id=$1 last;
rewrite ^/dashboard/roles/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=role&target=role&action=delete&id=$1 last;
rewrite ^/dashboard/custom-fields(/?)$ /apps/dashboard/index.php?route=custom-fields&target=custom-fields&action=getAll last;
rewrite ^/dashboard/custom-fields/create(/?)$ /apps/dashboard/index.php?route=custom-fields&target=custom-fields&action=insert last;
rewrite ^/dashboard/custom-fields/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=custom-fields&target=custom-fields&action=update&id=$1 last;
rewrite ^/dashboard/custom-fields/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=custom-fields&target=custom-fields&action=delete&id=$1 last;
rewrite ^/dashboard/chest/delete/([0-9]+)/([0-9]+)(/?)$ /apps/dashboard/index.php?route=chest&target=chest&action=delete&chestID=$1&accountID=$2 last;
rewrite ^/dashboard/support(/?)$ /apps/dashboard/index.php?route=support&target=support&action=getAll last;
rewrite ^/dashboard/support/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=support&action=getAll&page=$1 last;
rewrite ^/dashboard/support/waiting-reply(/?)$ /apps/dashboard/index.php?route=support&target=support&category=unread&action=getAll last;
rewrite ^/dashboard/support/waiting-reply/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=support&category=unread&action=getAll&page=$1 last;
rewrite ^/dashboard/support/answered(/?)$ /apps/dashboard/index.php?route=support&target=support&category=readed&action=getAll last;
rewrite ^/dashboard/support/answered/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=support&category=readed&action=getAll&page=$1 last;
rewrite ^/dashboard/support/closed(/?)$ /apps/dashboard/index.php?route=support&target=support&category=closed&action=getAll last;
rewrite ^/dashboard/support/closed/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=support&category=closed&action=getAll&page=$1 last;
rewrite ^/dashboard/support/view/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=support&action=get&id=$1 last;
rewrite ^/dashboard/support/messages/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=messages&action=delete&id=$1 last;
rewrite ^/dashboard/support/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=support&action=delete&id=$1 last;
rewrite ^/dashboard/support/delete-selected(/?)$ /apps/dashboard/index.php?route=support&target=support&action=delete-selected last;
rewrite ^/dashboard/support/close/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=support&action=close&id=$1 last;
rewrite ^/dashboard/support/categories(/?)$ /apps/dashboard/index.php?route=support&target=category&action=getAll last;
rewrite ^/dashboard/support/categories/create(/?)$ /apps/dashboard/index.php?route=support&target=category&action=insert last;
rewrite ^/dashboard/support/categories/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=category&action=update&id=$1 last;
rewrite ^/dashboard/support/categories/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=category&action=delete&id=$1 last;
rewrite ^/dashboard/support/quick-answers(/?)$ /apps/dashboard/index.php?route=support&target=answer&action=getAll last;
rewrite ^/dashboard/support/quick-answers/create(/?)$ /apps/dashboard/index.php?route=support&target=answer&action=insert last;
rewrite ^/dashboard/support/quick-answers/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=answer&action=update&id=$1 last;
rewrite ^/dashboard/support/quick-answers/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=support&target=answer&action=delete&id=$1 last;
rewrite ^/dashboard/leaderboards(/?)$ /apps/dashboard/index.php?route=leaderboards&target=leaderboards&action=getAll last;
rewrite ^/dashboard/leaderboards/create(/?)$ /apps/dashboard/index.php?route=leaderboards&target=leaderboards&action=insert last;
rewrite ^/dashboard/leaderboards/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=leaderboards&target=leaderboards&action=update&id=$1 last;
rewrite ^/dashboard/leaderboards/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=leaderboards&target=leaderboards&action=delete&id=$1 last;
rewrite ^/dashboard/pages(/?)$ /apps/dashboard/index.php?route=page&target=page&action=getAll last;
rewrite ^/dashboard/pages/create(/?)$ /apps/dashboard/index.php?route=page&target=page&action=insert last;
rewrite ^/dashboard/pages/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=page&target=page&action=update&id=$1 last;
rewrite ^/dashboard/pages/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=page&target=page&action=delete&id=$1 last;
rewrite ^/dashboard/vote(/?)$ /apps/dashboard/index.php?route=vote&target=vote&action=getAll last;
rewrite ^/dashboard/vote/create(/?)$ /apps/dashboard/index.php?route=vote&target=vote&action=insert last;
rewrite ^/dashboard/vote/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=vote&target=vote&action=update&id=$1 last;
rewrite ^/dashboard/vote/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=vote&target=vote&action=delete&id=$1 last;
rewrite ^/dashboard/help(/?)$ /apps/dashboard/index.php?route=help&target=article&action=getAll last;
rewrite ^/dashboard/help/([0-9]+)(/?)$ /apps/dashboard/index.php?route=help&target=article&action=getAll&page=$1 last;
rewrite ^/dashboard/help/create(/?)$ /apps/dashboard/index.php?route=help&target=article&action=insert last;
rewrite ^/dashboard/help/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=help&target=article&action=update&id=$1 last;
rewrite ^/dashboard/help/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=help&target=article&action=delete&id=$1 last;
rewrite ^/dashboard/help/topics(/?)$ /apps/dashboard/index.php?route=help&target=topic&action=getAll last;
rewrite ^/dashboard/help/topics/create(/?)$ /apps/dashboard/index.php?route=help&target=topic&action=insert last;
rewrite ^/dashboard/help/topics/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=help&target=topic&action=update&id=$1 last;
rewrite ^/dashboard/help/topics/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=help&target=topic&action=delete&id=$1 last;
rewrite ^/dashboard/bans(/?)$ /apps/dashboard/index.php?route=banned&target=ban&action=getAll last;
rewrite ^/dashboard/bans/create(/?)$ /apps/dashboard/index.php?route=banned&target=ban&action=insert last;
rewrite ^/dashboard/bans/create/([0-9a-zA-Z-_]+)(/?)$ /apps/dashboard/index.php?route=banned&target=ban&action=insert&id=$1 last;
rewrite ^/dashboard/bans/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=banned&target=ban&action=update&id=$1 last;
rewrite ^/dashboard/bans/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=banned&target=ban&action=delete&id=$1 last;
rewrite ^/dashboard/bans/website(/?)$ /apps/dashboard/index.php?route=banned&target=ban&category=site&action=getAll last;
rewrite ^/dashboard/bans/support(/?)$ /apps/dashboard/index.php?route=banned&target=ban&category=support&action=getAll last;
rewrite ^/dashboard/bans/comment(/?)$ /apps/dashboard/index.php?route=banned&target=ban&category=comment&action=getAll last;
rewrite ^/dashboard/files(/?)$ /apps/dashboard/index.php?route=download&target=download&action=getAll last;
rewrite ^/dashboard/files/create(/?)$ /apps/dashboard/index.php?route=download&target=download&action=insert last;
rewrite ^/dashboard/files/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=download&target=download&action=update&id=$1 last;
rewrite ^/dashboard/files/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=download&target=download&action=delete&id=$1 last;
rewrite ^/dashboard/announcements(/?)$ /apps/dashboard/index.php?route=broadcast&target=broadcast&action=getAll last;
rewrite ^/dashboard/announcements/create(/?)$ /apps/dashboard/index.php?route=broadcast&target=broadcast&action=insert last;
rewrite ^/dashboard/announcements/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=broadcast&target=broadcast&action=update&id=$1 last;
rewrite ^/dashboard/announcements/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=broadcast&target=broadcast&action=delete&id=$1 last;
rewrite ^/dashboard/slider(/?)$ /apps/dashboard/index.php?route=slider&target=slider&action=getAll last;
rewrite ^/dashboard/slider/create(/?)$ /apps/dashboard/index.php?route=slider&target=slider&action=insert last;
rewrite ^/dashboard/slider/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=slider&target=slider&action=update&id=$1 last;
rewrite ^/dashboard/slider/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=slider&target=slider&action=delete&id=$1 last;
rewrite ^/dashboard/payment-methods(/?)$ /apps/dashboard/index.php?route=payment&target=methods&action=getAll last;
rewrite ^/dashboard/payment-methods/edit/([0-9a-zA-Z-_]+)(/?)$ /apps/dashboard/index.php?route=payment&target=methods&action=update&id=$1 last;
rewrite ^/dashboard/theme/editor(/?)$ /apps/dashboard/theme-editor.php last;
rewrite ^/dashboard/theme/themes(/?)$ /apps/dashboard/index.php?route=theme&target=themes&action=getAll last;
rewrite ^/dashboard/theme/add-theme(/?)$ /apps/dashboard/index.php?route=theme&target=themes&action=insert last;
rewrite ^/dashboard/theme/update-theme/([0-9a-zA-Z-_]+)(/?)$ /apps/dashboard/index.php?route=theme&target=themes&action=update&id=$1 last;
rewrite ^/dashboard/theme/settings(/?)$ /apps/dashboard/index.php?route=theme&target=settings&action=update last;
rewrite ^/dashboard/theme/header(/?)$ /apps/dashboard/index.php?route=theme&target=header&action=update last;
rewrite ^/dashboard/theme/css(/?)$ /apps/dashboard/index.php?route=theme&target=css&action=update last;
rewrite ^/dashboard/theme/update(/?)$ /apps/dashboard/index.php?route=theme-update last;
rewrite ^/dashboard/modules(/?)$ /apps/dashboard/index.php?route=module&target=module&action=update last;
rewrite ^/dashboard/settings/general(/?)$ /apps/dashboard/index.php?route=settings&target=general&action=update last;
rewrite ^/dashboard/settings/system(/?)$ /apps/dashboard/index.php?route=settings&target=system&action=update last;
rewrite ^/dashboard/settings/seo(/?)$ /apps/dashboard/index.php?route=settings&target=seo&action=update last;
rewrite ^/dashboard/settings/smtp(/?)$ /apps/dashboard/index.php?route=settings&target=smtp&action=update last;
rewrite ^/dashboard/settings/webhooks(/?)$ /apps/dashboard/index.php?route=settings&target=webhooks&action=update last;
rewrite ^/dashboard/settings/language(/?)$ /apps/dashboard/index.php?route=settings&target=language&action=getAll last;
rewrite ^/dashboard/settings/language/create(/?)$ /apps/dashboard/index.php?route=settings&target=language&action=insert last;
rewrite ^/dashboard/settings/language/edit/([0-9a-zA-Z-_]+)(/?)$ /apps/dashboard/index.php?route=settings&target=language&action=update&id=$1 last;
rewrite ^/dashboard/settings/language/set/([0-9a-zA-Z-_]+)(/?)$ /apps/dashboard/index.php?route=settings&target=language&action=set&id=$1 last;
rewrite ^/dashboard/settings/language/delete/([0-9a-zA-Z-_]+)(/?)$ /apps/dashboard/index.php?route=settings&target=language&action=delete&id=$1 last;
rewrite ^/dashboard/settings/currency(/?)$ /apps/dashboard/index.php?route=settings&target=currency&action=getAll last;
rewrite ^/dashboard/settings/currency/set/([0-9a-zA-Z-_]+)(/?)$ /apps/dashboard/index.php?route=settings&target=currency&action=set&id=$1 last;
rewrite ^/dashboard/settings/currency/delete/([0-9a-zA-Z-_]+)(/?)$ /apps/dashboard/index.php?route=settings&target=currency&action=delete&id=$1 last;
rewrite ^/dashboard/settings/tebex(/?)$ /apps/dashboard/index.php?route=settings&target=tebex&action=update last;
rewrite ^/dashboard/applications(/?)$ /apps/dashboard/index.php?route=application&target=application&action=getAll last;
rewrite ^/dashboard/applications/([0-9]+)(/?)$ /apps/dashboard/index.php?route=application&target=application&action=getAll&page=$1 last;
rewrite ^/dashboard/applications/view/([0-9]+)(/?)$ /apps/dashboard/index.php?route=application&target=application&action=view&id=$1 last;
rewrite ^/dashboard/applications/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=application&target=application&action=delete&id=$1 last;
rewrite ^/dashboard/applications/forms(/?)$ /apps/dashboard/index.php?route=application&target=form&action=getAll last;
rewrite ^/dashboard/applications/forms/create(/?)$ /apps/dashboard/index.php?route=application&target=form&action=insert last;
rewrite ^/dashboard/applications/forms/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=application&target=form&action=update&id=$1 last;
rewrite ^/dashboard/applications/forms/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=application&target=form&action=delete&id=$1 last;
rewrite ^/dashboard/form-answers(/?)$ /apps/dashboard/index.php?route=form&target=answers&action=getAll last;
rewrite ^/dashboard/form-answers/([0-9]+)(/?)$ /apps/dashboard/index.php?route=form&target=answers&action=getAll&page=$1 last;
rewrite ^/dashboard/form-answers/view/([0-9]+)(/?)$ /apps/dashboard/index.php?route=form&target=answers&action=view&id=$1 last;
rewrite ^/dashboard/form-answers/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=form&target=answers&action=delete&id=$1 last;
rewrite ^/dashboard/form(/?)$ /apps/dashboard/index.php?route=form&target=form&action=getAll last;
rewrite ^/dashboard/form/create(/?)$ /apps/dashboard/index.php?route=form&target=form&action=insert last;
rewrite ^/dashboard/form/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=form&target=form&action=update&id=$1 last;
rewrite ^/dashboard/form/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=form&target=form&action=delete&id=$1 last;
rewrite ^/dashboard/logs(/?)$ /apps/dashboard/index.php?route=logs&target=logs&action=getAll last;
rewrite ^/dashboard/logs/([0-9]+)(/?)$ /apps/dashboard/index.php?route=logs&target=logs&action=getAll&page=$1 last;
rewrite ^/dashboard/logs/delete-all(/?)$ /apps/dashboard/index.php?route=logs&target=logs&action=deleteAll last;
rewrite ^/dashboard/logs/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=logs&target=logs&action=delete&id=$1 last;
rewrite ^/dashboard/gaming-night(/?)$ /apps/dashboard/index.php?route=gaming-night last;
rewrite ^/dashboard/forum/threads(/?)$ /apps/dashboard/index.php?route=forum&target=thread&action=getAll last;
rewrite ^/dashboard/forum/threads/([0-9]+)(/?)$ /apps/dashboard/index.php?route=forum&target=thread&action=getAll&page=$1 last;
rewrite ^/dashboard/forum/categories(/?)$ /apps/dashboard/index.php?route=forum&target=category&action=getAll last;
rewrite ^/dashboard/forum/categories/create(/?)$ /apps/dashboard/index.php?route=forum&target=category&action=insert last;
rewrite ^/dashboard/forum/categories/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=forum&target=category&action=update&id=$1 last;
rewrite ^/dashboard/forum/categories/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=forum&target=category&action=delete&id=$1 last;
rewrite ^/dashboard/vip/table(/?)$ /apps/dashboard/index.php?route=vip-table&target=vip&action=list last;
rewrite ^/dashboard/vip/table/create(/?)$ /apps/dashboard/index.php?route=vip-table&target=vip&action=insert last;
rewrite ^/dashboard/vip/table/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=vip-table&target=vip&action=update&id=$1 last;
rewrite ^/dashboard/vip/table/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=vip-table&target=vip&action=delete&id=$1 last;
rewrite ^/dashboard/vip/features(/?)$ /apps/dashboard/index.php?route=vip-table&target=vip&action=featureList last;
rewrite ^/dashboard/vip/features/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=vip-table&target=vip&action=featureInsert&id=$1 last;
rewrite ^/dashboard/vip/descriptions(/?)$ /apps/dashboard/index.php?route=vip-table&target=vip&action=explainList last;
rewrite ^/dashboard/vip/descriptions/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=vip-table&target=vip&action=explainInsert&id=$1 last;
rewrite ^/dashboard/suggestions(/?)$ /apps/dashboard/index.php?route=suggestion&target=suggestion&action=getAll last;
rewrite ^/dashboard/suggestions/create(/?)$ /apps/dashboard/index.php?route=suggestion&target=suggestion&action=insert last;
rewrite ^/dashboard/suggestions/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=suggestion&target=suggestion&action=update&id=$1 last;
rewrite ^/dashboard/suggestions/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=suggestion&target=suggestion&action=delete&id=$1 last;
rewrite ^/dashboard/suggestions/categories(/?)$ /apps/dashboard/index.php?route=suggestion&target=category&action=getAll last;
rewrite ^/dashboard/suggestions/categories/create(/?)$ /apps/dashboard/index.php?route=suggestion&target=category&action=insert last;
rewrite ^/dashboard/suggestions/categories/edit/([0-9]+)(/?)$ /apps/dashboard/index.php?route=suggestion&target=category&action=update&id=$1 last;
rewrite ^/dashboard/suggestions/categories/delete/([0-9]+)(/?)$ /apps/dashboard/index.php?route=suggestion&target=category&action=delete&id=$1 last;
rewrite ^/([0-9a-zA-Z-_]+)(/?)$ /apps/main/index.php?route=page&slug=$1 last;
}
Ardından, dosyadan Nginx'in başlangıç sırasında okuduğu sites-enabled
dizinine bir bağlantı oluşturarak dosyayı etkinleştirelim:
sudo ln -s /etc/nginx/sites-available/your_domain.com /etc/nginx/sites-enabled/
Son olarak, yapılandırmanın etkili olması için nginx'i yeniden başlatın.
sudo systemctl restart nginx
PHP 7.4'ün Yüklenmesi
Ubuntu
Daha sonra, görevi yerine getirmek için bazı önemli paketleri yükleyin.
sudo apt install software-properties-common -y
Bir sonraki adım ondrej PPA deposunu eklemektir.
sudo add-apt-repository ppa:ondrej/php -y
Yeni depoyu yüklemek için APT'yi yenileyin:
sudo apt update -y
Ve şimdi PHP 7.4'ü yükleyebilirsiniz
sudo apt install php7.4 php7.4-fpm -y
E: Package 'php7.4' has no installation candidate
PHP 7.4'ü yüklerken bu hatayı alırsanız. Bu komutu çalıştırın:
sudo sed -i 's/kinetic/jammy/' /etc/apt/sources.list.d/ondrej-ubuntu-*.list
Ardından APT'yi yenileyin:
sudo apt update -y
Şimdi, php 7.4'ü yükleyebilirsiniz:
sudo apt install php7.4 php7.4-fpm -y
Gerekli php uzantılarını yükleyin.
sudo apt install php7.4-{cli,common,curl,zip,mysql,mbstring,json,imagick} -y
php7.4-fpm hizmetini başlatın ve etkinleştirin.
sudo systemctl start php7.4-fpm
sudo systemctl enable php7.4-fpm
Debian
Daha sonra, görevi yerine getirmek için bazı önemli paketleri yükleyin.
sudo apt-get install ca-certificates apt-transport-https software-properties-common curl lsb-release -y
Otomatik bir komut dosyası kullanarak GPG anahtarını ve deposunu içe aktarın ve yükleyin.
curl -sSL https://packages.sury.org/php/README.txt | sudo bash -x
Yeni depoyu yüklemek için APT'yi yenileyin:
sudo apt update -y
Ve şimdi PHP 7.4'ü yükleyebilirsiniz
sudo apt install php7.4 php7.4-fpm -y
Gerekli php uzantılarını yükleyin.
sudo apt install php7.4-{cli,common,curl,zip,mysql,mbstring,json,imagick} -y
php7.4-fpm hizmetini başlatın ve etkinleştirin.
sudo systemctl start php7.4-fpm
sudo systemctl enable php7.4-fpm
PHP Ayarlarını Yapılandırma
LeaderOS yazılımının çalışabilmesi için bazı php ayarlarının yapılandırılması gerekmektedir.
php.ini dosyasını açın.
sudo nano /etc/php/7.4/fpm/php.ini
Bu satırları sonuna ekleyin.
allow_url_fopen=On
short_open_tag=On
upload_max_filesize=128M
post_max_size=128M
max_input_vars=10000
memory_limit=512M
max_execution_time=600
max_input_time=600
Ardından dosyayı kaydedin ve çıkın. Şimdi ayarların yürürlüğe girmesi için nginx ve php-fpm'i yeniden başlatmamız gerekiyor.
sudo systemctl restart nginx
sudo systemctl restart php7.4-fpm
Ioncube Yükleyiciyi Yükleme
IonCube Yükleyici dosyalarını indirin.
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
Ardından tar komutunu kullanarak indirilen dosyanın sıkıştırmasını açın.
tar -zxvf ioncube_loaders_lin_x86*
Sıkıştırılmamış klasöre geçin.
cd ioncube/
Ardından, PHP sürüm 7.4 için uzantı dizininin konumunu bulun, ioncube yükleyici dosyasının yükleneceği yer burasıdır.
php -i | grep extension_dir
> Output
extension_dir => /usr/lib/php/20190902 => /usr/lib/php/20190902
Daha sonra PHP 7.4 sürümümüz için ioncube yükleyicisini uzantı dizinine (/usr/lib/php/20190902) kopyalamamız gerekiyor.
Yukarıdaki komutta PHP sürümünü ve uzantı dizinini sistem yapılandırmanıza göre değiştirdiğinizden emin olun.
sudo cp ioncube_loader_lin_7.4.so /usr/lib/php/20190902
Şimdi php.ini dosyasında ioncube yükleyiciyi PHP ile çalışacak şekilde yapılandırmamız gerekiyor.
sudo nano /etc/php/7.4/fpm/php.ini
Ardından aşağıdaki satırı ilgili php.ini dosyasına ilk satır olarak ekleyin.
zend_extension = /usr/lib/php/20190902/ioncube_loader_lin_7.4.so
Ardından dosyayı kaydedin ve çıkın. Şimdi ioncube yükleyicilerinin devreye girmesi için nginx ve php-fpm'i yeniden başlatmamız gerekiyor.
sudo systemctl restart nginx
sudo systemctl restart php7.4-fpm
MariaDB (MySQL) Kurulumu
mariadb paketini yükleyin.
sudo apt install mariadb-server -y
systemctl start
komutu ile MariaDB'nin çalıştığından emin olun:
sudo systemctl start mariadb.service
Ek olarak, MariaDB'nin gösterildiği gibi sistem başlangıcında her seferinde başlamasını etkinleştirmeyi düşünün.
sudo systemctl enable mariadb.service
Terminalinizden MariaDB komut istemini açın:
sudo mariadb
Ardından, normal bir kullanıcı oluşturun. Burada, leaderos adında bir kullanıcı oluşturuyoruz. secret_password yerine tercih ettiğiniz kullanıcının parolasını yazdığınızdan emin olun.
CREATE USER 'leaderos_user'@'localhost' IDENTIFIED BY 'secret_password';
Bir veritabanı oluşturun.
CREATE DATABASE leaderos_db;
Ardından, leaderos kullanıcısına tüm ayrıcalıkları verin. Bu, veritabanı kök kullanıcısının tüm izinlerini etkin bir şekilde kullanıcıya atar.
GRANT ALL PRIVILEGES ON leaderos_db.* TO 'leaderos_user'@'localhost' WITH GRANT OPTION;
Değişiklikleri uygulamak için ayrıcalıkları temizleyin.
FLUSH PRIVILEGES;
Son olarak, veritabanı sunucusundan çıkın.
exit;
MariaDB'yi (MySQL) Yapılandırma
MariaDB yapılandırma dosyasını açın.
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Bu satırları [mysqld] bölümünün altına ekleyin.
sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Ardından dosyayı kaydedin ve çıkın. Şimdi ayarların yürürlüğe girmesi için MariaDB'yi yeniden başlatmamız gerekiyor.
sudo systemctl restart mariadb.service
LeaderOS'u Yükleme
leaderos.zip dosyasını FTP aracılığıyla /var/www/your_domain.com/html adresine yükleyin ve leaderos.zip dosyasını açın.
Web sitenizi ziyaret edin. Kurulum sayfasını göreceksiniz.
Eğer "Dosya hatası! Lütfen LeaderOS ile iletişime geçin. (connect.php)" hatası alırsanız, dizinin sahipliğini www-data ile atayın.
sudo chown -R www-data:www-data /var/www/your_domain.com/html
Last updated