Host a Laravel website into freebsd ...

Hello,
I think the title says it ... how do I host a laravel website into a FreeBSD server, I have Nginx Php mysql, also composer installed in /usr/bin ...
The website was made on windows ... I tried to copy all the files into the root dir of the server which is /var/website/{APPNAME}, and I also set up database ... but the thing is I get the error The stream or file "/var/webapps/IFVM_Website/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied when I try to access it via a webbrowser ... so I tryed to set permission of [APPNAME] folder to 777 recursivly ... then the website apprears but lots of things are missing ...

so I wonder what should i do? how do I fix the permission related errors ...?? and how do I fix the missing file problem too ??
 
Don't just randomly change permissions to 777 to try and fix things.

For a start is it /var/website or /var/webapps?

You need to take a step back and make sure all your paths are correct and that everything is where it should be. Then make sure the webserver (probably running under www:www user) has permission to any folders/files it needs to write to). For this I'd usually change the group on just those folders to www and add group write permission.
 
I have Nginx Php mysql, also composer installed in /usr/bin ...
They're not supposed to be there. None of this belongs in /usr/bin/. How did you install them?

I tried to copy all the files into the root dir of the server which is /var/website/{APPNAME},
Base directory on FreeBSD is typically /usr/local/www.
so I tryed to set permission of [APPNAME] folder to 777 recursivly
Never, ever, do this. This is NEVER the proper way to fix things. Never do this, not even temporarily for "testing". Did I mention you should never do this? It's worth repeating, never do this.
 
Back
Top