New laravel install, why will page not load - laravel-5

I am brand new to laravel applications. I have completed a fresh install of laravel and would now like to see it run live. I have used the artisan serve and got it to run locally, but would like to see it on my remote amazon server. I have adjusted permissions on the storage, bootstrap, cache directories to 777(i know 777 is dangerous), but when i go to the ip address, it always give me a 500 error. I have also adjusted in the apache config, in sites available, to point at the public folder of my project. What other steps are necessary to serve this from my remote server? Are there other directories where permissions need to be adjusted?

Related

How to deploy docker containers to shared hosting

I create my last laravel app using docker, but I don't have any idea, how I can host my app?
I have phpMyadmin container and laravel app container.
How I can use it with whm server?
The most of users do that using docker cloud, but I don't find any tutorials or article talk about docker whm hosting what is the best practices doing that?
cPanel does not have Docker by default. If you have root access to machine which runs cPanel of course you can install it but you will not be able to control it via cPanel.
You can check these cPanel support pages:
https://support.cpanel.net/hc/en-us/articles/360062418794-Can-I-run-docker-on-a-cPanel-server-
https://support.cpanel.net/hc/en-us/articles/4402393047703-How-To-Install-Docker-Compose-
And I think you don't have root access to that shared machine. Therefore I think you are just looking for a way to publish your Laravel application on a shared hosting.
A basic Laravel application needs it's files on a server and a database connection (if needed). cPanel can provide both of this. You can upload your Laravel application files to your cPanel Website users home folder, arrange directory structure and point that Website's HTTP requests to your application's public folder.
You can use cPanel's File Manager or connect your server with a FTP client to upload and rearrange your application's files.
An application needs a database connection. In cPanel you can create a MySQL database and a MySQL user for it. Then you can change your database connection settings according to them.
You can check some other StackOverflow answers and tutorials for "Publising Laravel on a cPanel shared hosting"
How do I upload a laravel project on cPanel shared hosting?
https://medium.com/#kajan746/how-to-host-laravel-project-on-cpanel-83389d6d31e6
But as I said before; this has nothing with Docker. Those instructions shows how to use file manager and mysql wizards to prepare a production environment for Laravel on a shared cPanel host.

laravel production in windows server

im new in laravel and i have done my first project, I have xampp,mysql and windows server 2012 (installed with composer and laravel 7). i'm running the application in server via command below
php artisan serve --host=[ip] --port=[port]
application is running fine within the network. However, it seems super slow. I'm not sure if this the correct way of deploying it into production. Do you have any recommendation/instructions where can i run/deploy apps within the resource that I have.
Speed of your laravel project depends on many parameters like hardware config (CPU,RAM,...) and also number of users and level of requests and processes. But consider that for an app in production it's better to not use php artisan serve command. It's only for development environment. I don't that how much you know about linux but I suggest you to change your stack and use linux as your production os with nginx as web server alongside php-fpm for running your app in production. But for now you should config xmapp's apache web server to run your application from project's public folder. Here is a link you can use: https://insidert.medium.com/setting-up-laravel-project-on-windows-2aa7e4f080da
good luck

Laravel PHP Sessions for IPS Community

I'm trying to install IPS Community(https://invisioncommunity.com/) on a fresh local laravel server. However, when I enter the installation process I get the following error. It might be worth mentioning the server is running on a homestead server too.
The installer uses PHP sessions to store data, however PHP sessions are currently not working correctly on your server. This is an issue you will need to contact your host about.
Does anyone know how to enable PHP sessions?
Anyone having this issue... You need to delete the "Constants.php" in your IPS directory to fix this.

How to Deploy a Laravel Application to Amazon Web Server AWS

I already have a PHP website running under /var/www/html root location, and now I would like to deploy a Laravel application in /var/www/html/sales folder. I have installed Composer and cloned Laravel GitHub repository in /var/www/html/sales folder, but when I type www.domain.com/sales/public it says the site is not reachable whereas if I type www.domain.com, my other PHP website is working fine.
What am I missing? Can anyone please help me with this?

Laravel Valet replacing public sites with 404 Not Found

I'm learning Laravel, and I successfully installed Valet. Did some basic development. Then moved on to other things totally unrelated. About a week later (today) I visited two sites (in Chrome and Safari Mac):
postmarkapp.com
getsatisfaction.com/activeinbox
And I get "Valet - Page Not Found".
I do not get this issue any other website I visit. And I've never seen something selectively take over a site like this. It's obviously related to my local configuration but because I'm new to Valet I have no idea where to start with this.
What is happening?
How is this possible?
How do I resolve this?
What is happening?
Your network configuration is pointing those domains to valet instead of looking them up through external name servers.
How is this possible
Laravel Valet uses dnsmasq so you don't have to worry about editing your /etc/hosts file for each dev site you create. It can step in and provide ip resolution before looking externally for an ip address.
How do I fix this
From a terminal run:
valet domain test
valet restart
My guess is you changed your domain on valet to com and the reason other sites are working is their ip addresses are already cached locally.
In your project directory, you will need the public folder.
To get this, copy the public_html and duplicate it.
Proceed to rename it to public
If it's a new project, create the .env file and run php artisan key:generate
Then valet restart and you'll be good now.

Resources