I came across a project where I have to deploy a Laravel app in a domain that is not the root domain of a HostGator shared business hosting account, but one of the added domains. Anyone has any experience with this type of deployment?
Thank you in advance.
Related
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.
I have a domain name with GoDaddy: example.com.
I want example.com to point to my front-end app on Netlify (currently doing so fine with the nameservers pointing to Netlify).
I have created a subdomain on GoDaddy, api.example.com. I want to point this to my back-end app on Heroku (currently working with Heroku’s free (and rather whacky) subdomain name.
I am struggling getting my subdomain on GoDaddy to point to my app on Heorku. The DNS Target given by Heroku is to be added into the DNS. But in GoDaddy, the DNS is unable to be managed because my nameservers are already pointing towards Netlify - and it is my assumption, I cannot point a subdomain to Heroku via Netlify (unless I’m mistaken). I have checked other answers on here, but none seem to face this problem of nameservers already pointing elsehwere.
I’m pretty new to this back-end deployment, so any help would be gratefully appreciated. Thank you in advance.
I created a domain with GoDaddy, and connected it with Digital Ocean.
I think the domain connected exactly to Digital Ocean.
In Laravel Forge, I made an app with that domain, and deployed my GitHub project.
The problem is, if I visit my website, it is showing just the "Welcome to nginx!" page. How do I make it display the code I wrote?
If you deployed your application in default directory, then setting up the domain DNS records should point to you server ip address and your website should be accessible from both server ip address and the domain.
But if you deployed your application in a different directory rather than the "default" you need to change your DNS records for pointing correctly to application directory.
You may want to take a look at Laracasts Deployment tuts for Laravel Forge
a basic tutorial by Jeffery Way: https://laracasts.com/series/build-and-configure-a-staging-server/episodes/1
a newer version for working with Laravel Forge by Marcel Pociot: https://laracasts.com/series/learn-laravel-forge/episodes/4
I recently paid for a domain and hosting services through two different vendors. I pointed the domain to the IP provided by the hosting service, uploaded my HTML through Cpanel to the public_html folder in file manager but the page does not load when I point my browser to the IP or my domain. Instead, I have to type in the IP or my domain and add /~MyUserName
Is there something I am doing wrong? I can't access a higher level of folder in file manager than /~MyUserName. Do I need to point my domain to the IP/~MyUserName?
Thanks in advance
File Structure
I just moved my personal website to Octopress from Drupal. I am hosting it on Heroku and I really don't like the herokuapp.com domain. I already have myname.com domain which I am planning to use with Heroku now for my main website.
The problem is I have some other websites hosted on my hosting service which use databases and other stuff. They were being accessed by project1.myname.com, project2.myname.com etc. I don't want to move them and have a similar subdomain naming thing to access them.
How can achieve this?
If I'm understanding you correctly, it should be easy to do this with your DNS settings. Simply point the DNS "A" records for "myname.com" and "www.myname.com" to Heroku and leave "project1.myname.com" and "project2.myname.com" pointing to your existing provider.