wordpress - 我无法访问 wp-admin。我正在使用 NGINX Ubuntu
问题描述
我的网站可以访问,只是wp-admin部分不能这样打开 这个网站无法访问
这是我的代码
server {
listen 80;
root /home/nicho/projects/strongbee-web-3.0;
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location ~* \.(gif|jpg|jpeg|png|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|mid|js|css|wml|swf|ttf|ttc|otf|eot|woff|woff2)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location / {
#file ($uri) or directory ($uri/)? if not, redirect to /index.php + query string
try_files $uri $uri/ /index.php?$args;
index index.html index.htm index.php;
}
location /wp-admin {
index index.php;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
谁能帮我?
解决方案
推荐阅读
- rust - 如何匹配所有空格?
- firebase - Flutter订阅/查询云火库中一个文件中的一个字段
- javascript - 我的 angular10 应用程序中多部分/表单数据的图像上传 API 错误
- image - Flutter 不会加载特定的图像
- javascript - 如何将 rgb 字符串(例如“rgb(255, 0, 0)”)转换为实际颜色
- python - 模块“whitenoise.django”错误中没有名称“DjangoWhiteNoise”
- xml - 是否在野外使用 DTD 外部未解析实体和符号?
- ktor - Ktor 相当于 Reactor 项目中的“上下文”?
- azure - azure devops - 使用 rest api 传递多维参数
- sql - SQL 没有这个函数 YEAR