Welcome! Log In Create A New Profile

Advanced

Nginx Subdomain Wordpress Permalinks 404 Error

Posted by SanTi 
Nginx Subdomain Wordpress Permalinks 404 Error
December 31, 2018 05:15PM
Merhaba, benim serverımda tek web sitem ve bir de subdomainim var. Subdomain ve normal domaine de wordpress kurdum nginx kurduğum için normal domainde sıkıntı yaşadım ama daha sonra kalıcı bağlantı sorunu alttaki kodu ekleyerek çözdüm.

if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$1 last;

}

Buna rağmen aynı configurasyon ayarlarını subdomaine eklediğimde sorun çözülmedi 404 hatası almaya devam ettim. category ve postname olarak linkleri ayarlıyorum ama nedense subdomainde bu olmadı. Error kısmında directorynin sonunda postanmeden sonra index.php koyduğunu gösteriyor ama file directory not found vs yazıyor. Bu sorunu çözmek için ne yapmam gerekiyor yardımcı olabilirseniz sevinirim.
---------------------------------------------------------------------------------------------------------------------------
server {
listen 1**.***.***.166:443;
server_name den1.*******.com;
root /home/admin/web/den1.*******.com/public_html;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/den1.*******.com.log combined;
access_log /var/log/nginx/domains/den1.*******.com.bytes bytes;
error_log /var/log/nginx/domains/den1.*******.com.error.log error;


ssl on;
ssl_certificate /home/admin/conf/web/ssl.den1.*******.com.pem;
ssl_certificate_key /home/admin/conf/web/ssl.den1.*******.com.key;


if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$1 last;

}
location / {

location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;

#try_files $uri $uri/ /index.php;
try_files $uri $uri/ /index.php?$args;

}

location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}

try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_pass 127.0.0.1:9003;
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/admin/web/den1.*******.com/document_errors/;
}

location ~* "/\.(htaccess|htpasswd)$" {
deny all;
return 404;
}

location /vstats/ {
alias /home/admin/web/den1.*******.com/stats/;
include /home/admin/conf/web/den1.*******.com.auth*;
}

include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include /etc/nginx/conf.d/webmail.inc*;

include /home/admin/conf/web/snginx.den1.*******.com.conf*;
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 151
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready