Filament app work on "http" but not on "https" on a VPS with SSL
Hi, my Filament app work on "http" but not on "https" on a VPS. I have configured a SSL certificate with Lets Encrypt. The classic key generate Laravel error worked on Https but as soon as I generated the key, the app was no longer working on https. Any idea ?
38 Replies
app work on "http" but not on "https"What does "work" mean? Any errors? The app key is unrelated to SSL Is your
APP_URL
correct?I land on the Filament Login page and can log in and use the app like in local
So what's broken?
When I use HTTPS
okayy
Can you show me your .env?
Only the app_url
Actually
Does it have https there?
Nope but when I changed it, it was the same
Um?
1. It's not https
2. It's localhost? How do you expect that to work on a remote VPS?
So what do I need to have as APP_URL if my domain name is test.com ?
yeah, i agree with dennis
test.com ?!
1. Ok
2. I have another Filament app on another VPS where I access it with the IP directly and with the APP_URL as localhost. So I thought it was not a problem
Its an example π
Yes. If you URL is
test.com
you should put test.com
as APP_URL
It should look like this:
APP_URL=https://wow.whatever.com
Then you need to configure your web server to use https (nginx/apche)
Do you know where your web server file is?
But probably without SSL? SSL Certificates for an IP is rather uncommon.
Ok so with the right APP_URL I still have
Sounds like a misconfiguration of your server.
As it's not a Laravel error.
because you still need to configure your server to use SSL @Chriis
But I don't know what I still have to do
Do you know where your web server file is?
Are you using nginx or apache?
Apache
It's hard to tell. We neither know your VPS, server infastructure, ...
Is it even configured to accept SSL?
Yes I think, the basic Apache welcome page worked in Https
without problem
Im not sure how apache works
I always use nginx
Try serving a simple HTML file via HTTPS until you get your configuration right
even if he does, he still has to give permissions to write to storage with chmod.
I think it gets more complicated with apache
@Chriis Is there any particular reason you are using apche?
You could try nginx https://laravel.com/docs/10.x/deployment
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. Weβve already laid the foundation β freeing you to create without sweating the small things.
Shouldn't be more complicated with Apache. Just a different configuration π€·πΌββοΈ
ehh. Personally, Ive always had issues with apache π. Something always went wrong
I cant change to Nginx currently π¬
Apache SSL Installation Instructions
Instructions for installing an SSL Certificate on an Apache Web Server.
Although, letsencrypt should do that for you
How To Secure Apache with Let's Encrypt on Ubuntu 22.04 | DigitalO...
Letβs Encrypt is a Certificate Authority (CA) that facilitates obtaining and installing free TLS/SSL certificates, thereby enabling encrypted HTTPS on web seβ¦
Thanks everyone, I ended up finding a solution π
Solution
I just needed to recreate a SSL certificate with certbot ...
Because I had a problem with the first one