You're probably going to need logs to rule out any permissions errors or the like.
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Does the uid you are using to run nginx have permissions to read the root folder (defined above as /var/www/html/partviewer/public , not the actual linux root) and below?
Yeah, sounds like a permissions error.
Check out this page. https://laravel.com/docs/10.x/deployment
You have to redirect all requests to index.php in the public folder. There is a sample Nginx configuration file on this page.
Could it be a route cache thing? may be worth trying artisan route:clear
followed by artisan route:cache
could you replace try_files $uri $uri/ /index.php?$query_string;
with try_files $uri $uri/ /index.php?$is_args$args
That might work
It was the first "solution" on google. Didn't work.
Oh, does the route hit your location? What's in the logs?
The correct URL appears in the browser but the page shows a 404. According to the logs they don't exist...but they're there...
I'm not sure, but looks like you're denying all .htaccess files. Laravel depends on .htaccess to make things work properly
Take a look on Laravel docs - Deployment to make sure your configs are right
As far as I know only Apache uses .htaccess files, Nginx works a different way
I already went through that. I wouldn't post here without starting with the official documentation.
Why are you using that?
location ~ /\.ht {
deny all;
}
You're denying the access to your root, which is the public/
folder and has the file .htaccess
that has
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
This file handles the income requests and send to the front controller.
The .htaccess file does nothing on nginx though.