PHP NGINX 無法在子域上執行

PHP NGINX 無法在子域上執行

我有一個子域”

ad.example.com 並且我正在嘗試安裝 CMS,但它卡在 install.php 並出現 404 not Found 錯誤

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 未找到錯誤

相關內容