修改 nginx  配置文件  这个配置文件是你配置你网站站点的文件

比如我修改的就是blog.conf 这个文件

server {
listen 80;
server_name blog.onespot.website www.onespot.website onespot.website;
root /var/www/html/;
#index index.html index.htm index.php;
index index.html index.htm index.php default.html default.htm default.php;

location / {
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}

location ~ .*\.(js|css)?$
{
expires 12h;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}

相关文章:

  • 2021-11-17
  • 2022-01-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2021-06-07
猜你喜欢
  • 2021-11-16
  • 2021-11-27
  • 2021-11-09
  • 2021-08-07
  • 2021-06-08
  • 2021-08-27
  • 2022-12-23
相关资源
相似解决方案