阿里云空服务器首次安装, 环境:centos8.2 + nginx 1.14.1 + php-fpm 7.2.24, ioncube 按提示安装成功。
php 信息: http://www.gupiaogs.store/test.php
安装完成以后,导入demo数据,后台正常,前台主页也正常显示,点击前端任意子页面,出现错误:
Uncaught ReferenceError: $ is not defined
任意切换主题,仍是这样。
nginx 配置:
```
upstream php {
server unix:/run/php-fpm/www.sock;
}
server {
listen 80;
server_name www.xxx.com;
index index.php index.html index.htm default.php default.htm default.html;
root /www/chanzhieps/www;
location ~ [^/]\.php(/|$) {
fastcgi_index index.php;
proxy_set_header X-Forwarded-Host $host:$server_port;
access_log /var/log/nginx/www.gupiaogs.store.log;
error_log /var/log/nginx/www.gupiaogs.store.err.log;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass php;
}
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
}
```
注释掉这一行
` rewrite ^(.*)$ /index.php?s=$1 last; break; `
这一行,问题仍旧存在。
回贴