作者:mobiledu2502927723 | 来源:互联网 | 2023-10-10 22:59
修改nginx 配置文件 这个配置文件是你配置你网站站点的文件比如我修改的就是blog.conf这个文件server{listen80;server_nameblog.onespo
修改 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;
}
}
越努力越幸运
原文链接:https://www.cnblogs.com/guangzhou11/p/14743558.html