th3ja
th3ja
FFilament
Created by th3ja on 10/29/2023 in #❓┊help
Hostinger Shared Hosting subdomain for admin panel
Hello everyone, nice to meet you! Would really appreciate your help if you have the time! I've chosen Hostinger's Shared Hosting Plan for my project. I've successfully setup the "front-end" with Jetstream on the main domain. What I'm trying to do: Use a subdomain exclusively for filament without the need of creating a new project inside the subdomain's directory. It's worth noting that everything lives within the same app.
What I did:
class AdminPanelProvider extends PanelProvider {
public function panel(Panel $panel): Panel {
return $panel
->default()
->id('admin')
->path('')
->domain(env('ADMIN_URL'))
class AdminPanelProvider extends PanelProvider {
public function panel(Panel $panel): Panel {
return $panel
->default()
->id('admin')
->path('')
->domain(env('ADMIN_URL'))
I've set up the subdomain as an env variable that I've configured within the production env. Not sure is this is the correct way to work in production because it works as expected locally. ✅ I've implemented the UserContract in the User model The error: 403 forbidden Below is a snippet of the project's root .htaccess that i've attempted with no luck
apache
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain\.yourdomain\.com [NC]
RewriteRule ^(.*)$ public/$1 [L]
apache
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain\.yourdomain\.com [NC]
RewriteRule ^(.*)$ public/$1 [L]
17 replies