Wordpress configuration fixed link nginx access 404 problem solution
WordPress supports the use of permalinks, but in the ngnix environment, 404 appears after visiting the page,
In fact, there are official documents, and you need to write the configuration separately.
The sample code I configured here is as follows:
server {
listen 80;
server_name www.chaichunyan.com;
access_log /var/log/nginx/access.log main;
location / {
root /www/data/xxx;
index index.php index.html index.htm;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~ \.php$ {
root /www/data/xxx;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
generic lipitor 10mg & lt;a href="https://lipiws.top/"& gt;order lipitor 40mg& lt;/a& gt; atorvastatin usa
Wlyxdm
2024-03-07