国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

將 Azure 應(yīng)用程式服務(wù)升級到 PHP 8.1 後,nginx 遇到 404 錯(cuò)誤
P粉988025835
P粉988025835 2024-01-01 19:35:49
0
1
783

我正在嘗試將 CakePHP 應(yīng)用程式從 PHP 7.4 移至使用 PHP 8.1 的 Azure 應(yīng)用程式服務(wù)。我很難確定使其工作所需的 nginx 配置。

我採用了基本的 nginx 配置,新增了 CakePHP 書中的更改,並在啟動(dòng)期間注入設(shè)定檔 (cp /home/default /etc/nginx/sites-enabled/default)。

除根頁面外,我一直收到 404 錯(cuò)誤。在索引頁面上,由於這些連結(jié)也傳回 404,因此也會出現(xiàn)佈局問題。

server {
    #proxy_cache cache;
        #proxy_cache_valid 200 1s;
    lis ten 8080;
    lis ten [::]:8080;
    #root /home/site/wwwroot;
    root /home/site/wwwroot/webroot;
    #index  index.php index.html index.htm;
    index  index.php;
    server_name  example.com www.example.com; 
    port_in_redirect off;

    #location / {            
    #    index  index.php index.html index.htm hostingstart.html;
    #}

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /html/;
    }
    
    # Disable .git directory
    location ~ /.git {
        deny all;
        access_log off;
        log_not_found off;
    }

    #added from CakePHP book
    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    #added from CakePHP book
    location ~ .php$ {
        try_files $uri =404;
        include fastcgi_params;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_intercept_errors on;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    # Add locations of phpmyadmin here.
    #location ~ [^/].php(/|$) {
    #    fastcgi_split_path_info ^(.+?.php)(|/.*)$;
    #    fastcgi_pass 127.0.0.1:9000;
    #    include fastcgi_params;
    #    fastcgi_param HTTP_PROXY "";
    #    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    #    fastcgi_param PATH_INFO $fastcgi_path_info;
    #    fastcgi_param QUERY_STRING $query_string;
    #    fastcgi_intercept_errors on;
    #    fastcgi_connect_timeout         300; 
    #    fastcgi_send_timeout           3600; 
    #    fastcgi_read_timeout           3600;
    #    fastcgi_buffer_size 128k;
    #    fastcgi_buffers 4 256k;
    #    fastcgi_busy_buffers_size 256k;
    #    fastcgi_temp_file_write_size 256k;
    #}
}


#
P粉988025835
P粉988025835

全部回覆(1)
P粉409742142

我未能在副本後面新增 service nginx restart 命令??磥憩F(xiàn)在可以工作了。

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板