/usr/local/vesta/data/templates/web/nginx/php-fpm
Ahanda bu dizinin içerisine mybb.tpl dosyasını oluştur. içine aşağıdaki kodu yapıştır gitsin.
server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; root %docroot%; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location / { rewrite ^/([^&]*)&(.*)$ http://clashroyaleturkiye.com/$1?$2 permanent; rewrite ^/((?i)sitemap-([^./]+)\.xml)$ /misc.php?google_seo_sitemap=$2; rewrite ^/((?i)forum\-([^./]+))$ /forumdisplay.php?google_seo_forum=$2; rewrite ^/((?i)konu\-([^./]+)\.html)$ /showthread.php?google_seo_thread=$2; rewrite ^/((?i)duyuru\-([^./]+)\.html)$ /announcements.php?google_seo_announcement=$2; rewrite ^/((?i)uye\-([^./]+)\.html)$ /member.php?action=profile&google_seo_user=$2; rewrite ^/((?i)takvim\-([^./]+)\.html)$ /calendar.php?google_seo_calendar=$2; rewrite ^/((?i)etkinlikler\-([^./]+)\.html)$ /calendar.php?action=event&google_seo_event=$2; location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { expires max; } location ~ [^/]\.php(/|$) { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; if (!-f $document_root$fastcgi_script_name) { return 404; } fastcgi_pass %backend_lsnr%; fastcgi_index index.php; include /etc/nginx/fastcgi_params; } } error_page 403 /error/404.html; error_page 404 /error/404.html; error_page 500 502 503 504 /error/50x.html; location /error/ { alias %home%/%user%/web/%domain%/document_errors/; } location ~* "/\.(htaccess|htpasswd)$" { deny all; return 404; } include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; include %home%/%user%/conf/web/nginx.%domain%.conf*; }
ssl kullanıcaklar için şablon
server { listen %ip%:%web_ssl_port%; server_name %domain_idn% %alias_idn%; root %sdocroot%; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; ssl on; ssl_certificate %ssl_pem%; ssl_certificate_key %ssl_key%; location / { rewrite ^/([^&]*)&(.*)$ http://clashroyaleturkiye.com/$1?$2 permanent; rewrite ^/((?i)sitemap-([^./]+)\.xml)$ /misc.php?google_seo_sitemap=$2; rewrite ^/((?i)forum\-([^./]+))$ /forumdisplay.php?google_seo_forum=$2; rewrite ^/((?i)konu\-([^./]+)\.html)$ /showthread.php?google_seo_thread=$2; rewrite ^/((?i)duyuru\-([^./]+)\.html)$ /announcements.php?google_seo_announcement=$2; rewrite ^/((?i)uye\-([^./]+)\.html)$ /member.php?action=profile&google_seo_user=$2; rewrite ^/((?i)takvim\-([^./]+)\.html)$ /calendar.php?google_seo_calendar=$2; rewrite ^/((?i)etkinlikler\-([^./]+)\.html)$ /calendar.php?action=event&google_seo_event=$2; location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { expires max; } location ~ [^/]\.php(/|$) { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; if (!-f $document_root$fastcgi_script_name) { return 404; } fastcgi_pass %backend_lsnr%; fastcgi_index index.php; include /etc/nginx/fastcgi_params; } } error_page 403 /error/404.html; error_page 404 /error/404.html; error_page 500 502 503 504 /error/50x.html; location /error/ { alias %home%/%user%/web/%domain%/document_errors/; } location ~* "/\.(htaccess|htpasswd)$" { deny all; return 404; } include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; include %home%/%user%/conf/web/snginx.%domain%.conf*; }