Laravel 7 - Unaccessible when trying to open site on production - laravel

i've deploied my laravel site on my server.
but i got a problem.
First:
my files was in the public_html folder.
I got the 403 forbidden error.
Then:
i tried to move them outside the public_html folder and only put the laravel's public folder contents onto that.
it only show "Nginx is functioning normally".
I get the next message:
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
and the next log: [error] 8949#0: *2449542 access forbidden by rule, client: 13.90.224.16, server: marchethiaroye.com, request: "GET /.env HTTP/1.1", host: "www.marchethiaroye.com"
error log
Please help! It's my first deploiment.
NB: the site is working on local
file configs message i got

Let's assume your laravel project name is 'test'.
And you put 'test' on public_html.
Try open http://IP_ADDR/test/public

Related

SuiteCRM 8 htaccess error after install: public/legacy/.htaccess: RewriteBase: argument is not a valid URL

I am trying to install SuiteCRM-8.2.1 on a server for a client and everything has run fine but there seems to be a .htaccess file problem
This is the error in the dashboard,profile, admin
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at you#example.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
[core:alert] [pid 67661] [client ::1:62740] /Applications/MAMP/htdocs/SuiteCRM/public/legacy/.htaccess: RewriteBase: argument is not a valid URL, referer: http://localhost:8888/SuiteCRM/public/
I am trying to install SuiteCRM on mamp. During the installation above errors encountered.
Pls suggest to me if anyone has a solution
Try updating RewriteBase to /public/legacy
Please also make sure that the site_url on /<your-crm>/public/legacy/config.php is correct. It should be pointing to your legacy path, something like: https://<your-host>/public/legacy
Note: Please note that if your vhost is not directly pointing to /<your-crm>/public and you have SuiteCRM installed on a sub-folder like https://<your-host>/suite-8/public you will need to add something like /suite-8/public/legacy to RewriteBase. And something like https://<your-host>/suite-8/public/legacy to site_url on config.php.

The photo failed to upload. Laravel Jetstream

Getting a 401 (Unauthorized) on the dashboard while trying to upload a profile picture. App URL is set properly and the feature is uncommented. the console which shows a post request to site.com/livewire/upload-file is showing unauthorized and the response is empty. screenshot
Check your tmp directory.
In php.ini, this is this line : sys_temp_dir = .....
In the code with : sys_get_temp_dir()
Verify if the directory exist
If we're talking about developer mode then it has to do with your URL. Start up the artisan server (within your project directory in your console/terminal write: "php artisan serve") and then go to http://127.0.0.1:8000/. You'll be able to upload the photo in a jiffy.

why can't resolve the required file Laravel on on my hosting server?

I'm trying to connect the folder public with Laravel but I can't
API is in another folder called Laravel01
I've changed the url on index.php
require __DIR__.'/../laravel01/vendor/autoload.php';
but I can't step back to the root folder
Fatal error: require(): Failed opening required '/homepages/15/d831964969/htdocs/api/../laravel01/vendor/autoload.php' (include_path='.:/usr/lib/php7.4') in /homepages/15/d831964969/htdocs/api/index.php on line 24
it keeps on api folder when it must link with laravel01 folder
sorry for my English and I hope everybody can understand me, thanks a lot

Laravel-Project deployment via FTP

I want to deploy my Laravel-Project but it always shows me this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
My Server Structure is like that:
/
/protected --> All Files and Folders within the project (+ /node_modules & /vendor) except the /public-folder
/public_html --> all Files and Folders within the /public-folder
I already changed the permissions for the /storage-folder and I already changed the paths in the /index.php to
require __DIR__.'/../protected/vendor/autoload.php';
and
$app = require_once __DIR__.'/../protected/bootstrap/app.php';
Any ideas?
place all the files from your localhost (htdocs) to public_html. Also make sure there is no any redirection in your domain-redirection on your hosting server.
The main reason of the internal server error is that your domain is not pointing the directory which you define.
In my case, the index.php file is
require DIR.'/../vendor/autoload.php';
$app = require_once DIR.'/../bootstrap/app.php';
Do all the changes one by one, this will work in your case hopefully. I have mentioned the reference link below please check
https://laracasts.com/discuss/channels/laravel/laravel-deploying-to-server-using-ftp

How to issue 500 Internal Server Error after true debug in laravel?

I create project with Laravel 5.2, After true debug in .env, show 500 Internal Server Error in localhost:8000 ! and after false debug in .env dont't show any error in localhost:8000.
How to issue this problem?
Type the command php --ini
Open the first file in the list with the name of php.ini
search for ;display_errors = Off and change it to display_errors = On
Then the blank 500 page should now contain text detailing the issue.

Resources