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
by the way, it works perfectly on local server. it only having some issue with the production server.
most of the time it's folder permissions for the
storage
folderthanx 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..
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
thanks a lot @blakdronzer ! it says:
No matching DirectoryIndex
found, and server-generated directory index forbidden by Options directive
do you have env file? since it hidden always forgotten π
well.. this is clear case of .htaccess file not mapped
yeah i have it. and it was connected to mysql already as well..
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
oh.. but it still didn't work..
this is the error message now:
htaccess: Invalid command 'serve', perhaps misspelled or defined by a module not included in the server configuration
I guess
mod_rewrite
not enabeld in Apacheso 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. π