How to Deploy a Laravel Application to Amazon Web Server AWS - laravel

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?

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.

How to deploy a React app with Strapi (from localhost to an external server e.g. AWS)?

I am developing a website, where posts are published through Strapi. My website is a React app. For Hosting, I use (Amazon's) AWS.
My question is simple. I want to deploy my localhost application, and make visible to the WWW. I was searching for tutorials but could not find any that helps me in this.
Thank you!
ok deploy process is simple:
You get a server like digital ocean.
you push your projecto into a github repo.
Configure mongo, node, ngnix and clone your project into www folder
enter in your folder app and make npm install --production
latter insall PM2 and make it run
this is a little explaination the real explanaition you can see here:
how to deploy strapi app on ubuntu server
The www you can modified adding Cname at your server and vinculing your dns with you domain in you name domain proveedor

Laravel subdomain in shared hosting

Already I have hosted my laravel project http://1d1s.co and working fine. Now I wanted to create dev environment as a subdomain like http://dev.1d1s.co. Kindly help me to do.
First of all, check if your hosting and DNS provider allow subdomains.
Then, you can folow
this example
if you're using Apache2
If you're using nginx, try following this guide

New laravel install, why will page not load

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?

How to run my laravel project on vps?

Now I just finished my laravel web application and want to upload to vps (digital ocean).In local, i usually trying to use by typing php artisan serve ,then go to access http://localhost:8000/ ,and everything is fine. But on vps ubuntu, how to type to run my laravel application,I already upload my project to git and pull from vps. I follow this instruction,but this instruction is just installation.Please guide me. Thanks in advance.

Resources