PHP NGINX 无法在子域名上运行

PHP NGINX 无法在子域名上运行

我有一个子域名”

ad.example.com,我正在尝试安装 CMS,但它卡在 install.php 上,出现 404 未找到错误

server {
    access_log /var/log/nginx/ad.example.com.access.log;

    error_log /var/log/nginx/ad.example.com.error.log;

    listen 8000;
    #listen [::]:80 default_server;
    server_name  ad.example.com;
    root   /usr/local/www/ad.example.com/html;


    location / {
       index  index.php index.html index.htm;
       try_files $uri $uri/ /index.php?$args;

    }
    location ~ \.php$ {
         
         fastcgi_split_path_info ^(.+\.php)(/.+)$;
         
         fastcgi_pass   unix:/var/run/php-fpm.sock;
         fastcgi_index  index.php;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         include        fastcgi_params;
    }

虽然我可以检查 ad.example.com/info.php 它可以工作,但是 ad.example.com/www/admin/info.php 不起作用 ad.example.com/www/admin/install.php 404 错误未找到

相关内容