当前位置:论坛首页 > Windows面板 > 求助

【待反馈】宝塔windows面板安装苹果cms后台无法访问提示404

发表在 Windows面板2023-11-9 13:46 [复制链接] 11 1412

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:windows 宝塔面板7.9   nginx1.22

系统版本:windows2012R264位

问题描述:大佬好,我有一个windows服务器用宝塔的nginx1.22 和php7.3的安装的苹果cms后台提示404请问什么情况了。我用的linux的宝塔nginx,一切正常,windows另外一台服务器用的小皮nginx页正常,唯独windows版本宝塔用的不支持,改用apche页正常,唯独就是windows 下nginx安装宝塔成功后台,跳到后台提示404

相关截图(日志、错误):苹果cms后台访问404     /admin.php/admin/index/index.html

使用道具 举报 只看该作者 回复
发表于 2023-11-9 14:29:25 | 显示全部楼层
您能够将这个站点的nginx配置文件发一下看看吗?
使用道具 举报 回复 支持 反对
发表于 2023-11-9 14:35:20 | 显示全部楼层
堡塔运维包子 发表于 2023-11-9 14:29
您能够将这个站点的nginx配置文件发一下看看吗?

你本地下载一个苹果cms应该用windows面板 应该就会遇到这个问题,我让我几个朋友安装了都是这个问题,windows面板的nginx不支持,
使用道具 举报 回复 支持 反对
发表于 2023-11-9 14:36:06 | 显示全部楼层
worker_processes auto;
worker_rlimit_nofile 51200;
events
{
        worker_connections 51200;
        multi_accept on;
}
http {
                include       mime.types;
                #include luawaf.conf;
                include proxy.conf;
        default_type  application/octet-stream;

        server_names_hash_bucket_size 512;
        client_header_buffer_size 32k;
        large_client_header_buffers 4 32k;
        client_max_body_size 50m;

        sendfile   on;
        tcp_nopush on;

        keepalive_timeout 60;

        tcp_nodelay on;

        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
        fastcgi_buffer_size 64k;
        fastcgi_buffers 4 64k;
        fastcgi_busy_buffers_size 128k;
        fastcgi_temp_file_write_size 256k;
                fastcgi_intercept_errors on;

        gzip on;
        gzip_min_length  1k;
        gzip_buffers     4 16k;
        gzip_http_version 1.1;
        gzip_comp_level 2;
        gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
        gzip_vary on;
        gzip_proxied   expired no-cache no-store private auth;
        gzip_disable   "MSIE [1-6]\.";

        limit_conn_zone $binary_remote_addr zone=perip:10m;
                limit_conn_zone $server_name zone=perserver:10m;

        server_tokens off;
        access_log off;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }
                location /nginx_status {  
                allow 127.0.0.1;
            deny all;
            stub_status on;  
            access_log  off;  
        }  
    }
    include vhost/*.conf;
    #加载vhost目录下的虚拟主机配置文件
}
使用道具 举报 回复 支持 反对
发表于 2023-11-9 14:38:32 | 显示全部楼层
server
{
    listen 80;
        listen 443 ssl;
    server_name aaa.tv www.aaa.tv bbb.tv www.bbb.tv;
    index index.php index.html index.htm default.php default.htm default.html;
    root d:/wwwroot/97yy;

        #START-ERROR-PAGE
        #error_page 403 /403.html;
        #error_page 404 /404.html;
    #error_page 502 /502.html;
        #END-ERROR-PAGE

    #HTTP_TO_HTTPS_START
    if ($server_port !~ 443){
        rewrite ^(/.*)$ https://$host$1 permanent;
    }
    #HTTP_TO_HTTPS_END

    #LIMIT_INFO_START
    #LIMIT_INFO_END

    #SSL-INFO-START
    ssl_certificate    ssl/aaa.tv/fullchain.pem;
    ssl_certificate_key    ssl/aaa.tv/privkey.pem;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;
    error_page 497  https://$host$request_uri;
    #SSL-INFO-END

    #反代清理缓存配置
    location ~ /purge(/.*) {
        proxy_cache_purge cache_one $1$is_args$args;
    }
    #proxy 反向代理
    include proxy/aaa.tv/*.conf;

    #PHP-INFO-START
    include php/73.conf;
    #PHP-INFO-END

    #REWRITE-START
    include rewrite/aaa.tv/*.conf;
    #REWRITE-END

    #redirect 重定向
    include redirect/aaa.tv/*.conf;

    #禁止访问的文件或目录
    location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
    {
        return 404;
    }

    #一键申请SSL证书验证目录相关设置
    location ~ \.well-known{
        allow all;
    }

        access_log  D:/sever/BtSoft/wwwlogs/aaa.tv.log;
    error_log  D:/sever/BtSoft/wwwlogs/aaa.tv.error.log;
}
使用道具 举报 回复 支持 反对
发表于 2023-11-9 14:39:08 | 显示全部楼层
我用的事苹果cmsV10
使用道具 举报 回复 支持 反对
发表于 2023-11-9 14:42:48 | 显示全部楼层
本地和服务器测试都一样,windows面板的宝塔,只要不用nginx就正常,用nginx的 苹果cms就不正常,但是用小皮的ngxin正常,用linux宝塔面板的nginx也是正常的

使用道具 举报 回复 支持 反对
发表于 2023-11-9 14:52:55 | 显示全部楼层
nginx 不支持thinkphp5.X版本的/admin.php/admin/index/index.html 这种地址访问。
使用道具 举报 回复 支持 反对
发表于 2023-11-9 16:07:26 | 显示全部楼层
试试配置对应项目的伪静态, 注意不要到有反向代理的网站添加
使用道具 举报 回复 支持 反对
发表于 2023-11-9 16:18:25 | 显示全部楼层
堡塔运维包子 发表于 2023-11-9 16:07
试试配置对应项目的伪静态, 注意不要到有反向代理的网站添加

都试过,先是这个nginx不支持 thinkphp的 后台路径url。我用小皮nginx版本 小皮的时候1.15版本 一点问题没有,就是用着不习惯,用linxu宝塔面的nginx,也是正常的 就是windows的nginx的就不行,用apache也可以。
使用道具 举报 回复 支持 反对
发表于 2024-2-15 21:18:18 | 显示全部楼层
nginx安装苹果cms之前要必须先配置伪静态,如果安装后再配置伪静态就不起作用了就会出现404错误,亲测可用,伪静态为:

if (!-e $request_filename) {

rewrite ^/index.php(.*)$ /index.php?s=$1 last;

rewrite ^/admin.php(.*)$ /admin.php?s=$1 last;

rewrite ^/api.php(.*)$ /api.php?s=$1 last;

rewrite ^(.*)$ /index.php?s=$1 last;

break;

}
使用道具 举报 回复 支持 反对
发表于 2024-3-24 19:16:32 | 显示全部楼层
宝塔用户_npfyfq 发表于 2024-2-15 21:18
nginx安装苹果cms之前要必须先配置伪静态,如果安装后再配置伪静态就不起作用了就会出现404错误,亲测可用 ...

牛批,解决
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理
快速回复 返回顶部 返回列表