我目前正尝试使用nginx在子域上实现wordpress。
我已经安装了所有的依赖项(php7.2、mariadb、mysql)并对其进行了配置。
当我试图访问这个网站时,我得到的是:

更明确的是:下面是我为使用wordpress配置nginx所做的工作:
sudo nano /etc/nginx/con.d/location.conf
server{
server_name subdomain.domain.fr;
root /home/domain/wordpress/;
location / {
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
include fastcgi_params;
index index.php index.html index.htm;
try_files $uri $uri/ =404;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}我的问题是,当我第一次使用wordpress网站时,我习惯于在页面上看到一些CSS。当我检查这个页面时,我可以看到css文件被包含了,但没有被使用。我不明白为什么。我想我有特权问题或其他问题,但这是我第一次在wordpress中使用nginx,所以我肯定做错了什么:

谢谢你的帮忙
发布于 2018-10-23 02:46:52
我找到了一个完美的解决方案:
加上这一点解决了我所有的问题:
location ~* \.(?:css|js|map|jpe?g|gif|png)$ { }谢谢你的帮忙
https://stackoverflow.com/questions/52939813
复制相似问题