iT邦幫忙

第 11 屆 iThome 鐵人賽

DAY 29
1
Software Development

PHP新手30天實戰金流系列 第 29

[Day29]平台串金流-- the redirection is out of control

  • 分享至 

  • twitterImage
  •  
PHP新手30天實戰金流, Laravel6

前言

終於可以連到在 GCE 上的專案了。不過,為什麼存取都轉向 api 了,路由都寫在 web.php 那耶QAQ

  • index.html 只有 短短幾行..
<?php

define('LARAVEL_START', microtime(true));


require __DIR__.'/../vendor/autoload.php';

$app = require_once __DIR__.'/../bootstrap/app.php';

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);


  • print_r($kernel); print_r($request); print_r($response); 印出來看 很複雜 好像沒有可以參考的資訊

  • 加了 alias 沒有用...

Alias /api /home/mainuser/www/api/public

 <directory home="" mainuser="" www="" api="" public="">[your config for this directory, e.g.:]
        Require all granted
        AllowOverride all</directory>
  • 不知如何是好, 只好把 api.php 完全清空, 強制讓路由讀 web.php。

BUT 還是遇到錯誤...

Not Found
The requested URL was not found on this server.

Apache/2.4.29 (Ubuntu) Server at 35.239.64.229 Port 80
  • 實在不知道為什麼 Not found QAQ

上一篇
[Day28]What’s the Difference between HTTP and HTTPS?
下一篇
[Day30]檔案權限, www-data,SUID, SGID, SBIT
系列文
PHP新手30天實戰金流34
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言