簡體   English   中英

抱歉,找不到您要尋找的頁面Laravel 5.5

[英]Random Sorry, the page you are looking for could not be found Laravel 5.5

我的程序運行良好,沒有任何錯誤,並且在隨機時間出現此錯誤頁面。

抱歉,找不到您要查找的頁面。

在我嘗試訪問的任何頁面中。 該錯誤將持續幾分鍾,然后自行清除,因為相同的頁面將按預期顯示。

很少的路由代碼

Route::get('/', 'indexController@index')->name('index-post-page'); Route::get('/login', 'indexController@login')->name('index-login-page'); Route::get('/post/{post_id}/{title}','indexController@SinglePost')->name('SinglePost-page'); Route::get('/account/contributor/dashboard','indexController@ContributorsDashboard')->name('page-contributor-admin'); Route::prefix('account')->group(function() { Route::get('/', 'indexController@accountDashboard')->name('admin-home-page'); Route::get('/nonadmin', 'indexController@accountDashboardNonAdmin')->name('page-non-admin'); Route::get('/nonadmin', 'indexController@ContributorsDashboard')->name('page-non-admin'); Route::get('/admin/add/category', 'indexController@AddCategory')->name('page.add.category'); Route::get('/admin/view/category', 'indexController@viewCategory')->name('page.load.all.category'); Route::get('/admin/audit/featured', 'indexController@AuditFeatured')->name('page.feature.unfeature.post'); Route::get('/post/notification/data/{contributor_id}', 'indexController@PostNotificationReportData')->name('admin.post.notification.report.data'); })

檢查了錯誤日志,我看到的只是錯誤404(找不到頁面)-盡管該頁面已存在

我想相信這不是程序問題,而是服務器問題,因為我在另一台服務器上托管了相同的腳本,並且一切順利。

但是我不知道該如何告訴導致錯誤的服務器管理員,或者我需要他修復什么。

URL: 程序鏈接

登錄鏈接: AUTOMATIC_LOGIN

有人可以給我一個提示或究竟是什么導致此隨機錯誤404

確保在apache配置中,您的Web根目錄指向公共目錄,而不是應用程序根目錄。

<VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
  ServerAdmin webmaster@host.example.com
    DocumentRoot "/www/docs/host.example.com/public"
    ServerName host.example.com
    ErrorLog "logs/host.example.com-error_log"
    TransferLog "logs/host.example.com-access_log"
</VirtualHost>

問題僅在於您的laravel應用程序在沒有/ public的情況下會運行得更好,尤其是從生命服務器運行時。

我知道這聽起來有些棘手,但是讓您的網絡服務器指向public_html / public /,您的應用程序將可以完美運行,而不會出現任何錯誤404。

這與@jason建議的內容一致。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM