【发布时间】:2018-10-23 10:46:52
【问题描述】:
我目前正在尝试使用 nginx 在子域上实现 wordpress。
我已经安装了所有依赖项(php 7.2、mariadb、mysql)并进行了配置。
当我尝试访问该网站时,这是我得到的:
更明确地说:这是我为使用 wordpress 配置 nginx 所做的:
sudo nano /etc/nginx/conf.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 文件已包含在内,但未使用。我不明白为什么。我认为我有特权问题或其他任何问题,但这是我第一次将 nginx 与 wordpress 一起使用,所以我一定做错了什么:
感谢您的帮助
【问题讨论】: