F
Filamentβ€’15mo ago
jeph

Deploy error on cpanel

I am rebuilding my app using filament v3. Everything works in v2. Now in v3 it wont work anymore. I'm just getting server error 500. To deploy it in cpanel, I just ran npm run build and then uploaded project folder in cpanel, connecting public index.php to /storage/framework/maintenance.php and bootstrap/app.php and connecting .env file to mysql. Am I missing something? or is there any other way of deploying it using cpanel? I did not upgrade filament. I rebuild it using a fresh filament v3, livewire 3, laravel 10, php 8.2. also already upgraded php 8.2 in cpanel.
14 Replies
jeph
jephOPβ€’15mo ago
by the way, it works perfectly on local server. it only having some issue with the production server.
Lara Zeus
Lara Zeusβ€’15mo ago
most of the time it's folder permissions for the storage folder
jeph
jephOPβ€’15mo ago
thanx a lot for your time @Lara Zeus . it didn't work though.. i also tried contacting hosgator support and all troubleshooting from their end did not work as well..
blakdronzer
blakdronzerβ€’15mo ago
what is the error that is comming? check the log files.. see what it have to say for ther errr switch to debug mode and see where the error is likely
jeph
jephOPβ€’15mo ago
thanks a lot @blakdronzer ! it says: No matching DirectoryIndex found, and server-generated directory index forbidden by Options directive
Lara Zeus
Lara Zeusβ€’15mo ago
do you have env file? since it hidden always forgotten πŸ™‚
blakdronzer
blakdronzerβ€’15mo ago
well.. this is clear case of .htaccess file not mapped
jeph
jephOPβ€’15mo ago
yeah i have it. and it was connected to mysql already as well..
blakdronzer
blakdronzerβ€’15mo ago
RewriteEngine on RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ ^$1 [N] RewriteCond %{REQUEST_URI} !public/ RewriteRule (.*) public/$1 [L] serve existing files in the /public folder as if they were in / RewriteCond %{DOCUMENT_ROOT}public%{REQUEST_URI} -f RewriteRule (.+) public/$1 [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ public/index.php [L] put it in ,htacess it should work
jeph
jephOPβ€’15mo ago
oh.. but it still didn't work..
jeph
jephOPβ€’15mo ago
No description
jeph
jephOPβ€’15mo ago
this is the error message now: htaccess: Invalid command 'serve', perhaps misspelled or defined by a module not included in the server configuration
Lara Zeus
Lara Zeusβ€’15mo ago
I guess mod_rewrite not enabeld in Apache
jeph
jephOPβ€’15mo ago
so sorry my bad. it is fixed now. the only problem is that I put spaces in .env APP_NAME= and did not put it inside quotation marks. πŸ˜…
Want results from more Discord servers?
Add your server