I have developed my Yii2 application locally and zipped the file and uploaded to CPanel under File Manager -> Public_html -> data. Now how can I access my application through the web? What is the url for my project? Should I do another installation? Please help me I'm stuck here.
Your projects are accessed trough the web folder. You have to point your Document Root of your domain to that folder.
If you cant make it work, you need to add your directory structure to the question.
Related
I'm a newbie to Laravel projects but I need to have one accessible over the internet so I tried using DirectAdmin but whenever I go to my domain I get an index (pictures attached).
I renamed the Laravel 'public' folder to 'public_html', is that correct? Here is my file structure.
Here is what I get when I go to my assigned domain which isn't my website at all.
The webpage should look something like this
I also found a laravel app using Softaculous linked here (https://panel.freehosting.com:2222/CMD_PLUGINS/softaculous/index.raw?act=software&soft=419). Am I required to use this app?
At first, you need to learn about the laravel directory structure. You don't need to change the laravel public folder to public_html. I am not sure how the DirectAdmin server works. but if you see a laravel directory instead of serving an application it's might be a path-related issue in your server. your domain should serve your application public folder.
I just found a tutorial for the DirectAdmin server with laravel. that might help.
I have a shared hosting with bluehost.com... can I just put my project on that.. like upload public files to public_html and others to root directory and backup MySQL DB and upload it to my shared hosting then edit my .env file... will this actually work with Laravel?
I searched most online resources and it requires ssh access to deploy, but the way I explained should not require that right?
I mean this way you don't have to go throw terminal access right?
I used to do that with WordPress when I want to set everything locally then upload it and edit URLs from the dashboard and stuff...
Yes it would work.
But you have to ensure one thing that, in your cpanel your domain point to the /public folder of laravel project.
Normally cPanel points the http requests to public_html folder, but laravel start from its public folder. You can achieve this by two way.
By pointing your server to straight to public folder
Copying the index.php to the public_html, in that case you have to edit index.php to run the laravel project properly. And I don't recommend this step. Step 1 is lot more easier.
I am confused about the deployment of the laravel project in the live server.
I searched for this and found many solutions.
There are many processes to deploy laravel projects in a live server.
Someone suggesting to remove all files and folder from public folder
someone saying to change .htaccess etc.
What is the perfect way to deploy laravel projects in the live server?
If, I have to remove public folder then, why laravel included it?
If I have to copy .htaccess to root directory and need to change it.
Then why it is not used laravel as default. Would someone explain it to me, please?
I have used the Laravel 5.1 php framework to build a web application on my local XAMPP server.
Which files or folders should be uploaded on my shared host server?
Should the .env file at root be uploaded?
In this case, if sensitive information such as database connection passwords are in this file, is there a security risk?
All project files should be uploaded under project root \var\www\project (project = all laravel project folder and files and \var\www\project\public is where your domain pointing.
Storage should have write permission.
.env will be under project root and it is not available for public access.
.env won't be accessible for public, if it is then you have a configuration problem with you web server.
Move All the files on xyz(your folder name for which domain/subdomain is mapped) folder
Then follow these steps
Go to public folder
Copy .htacsses file
Paste it in xyz folder
Change server.php to index.php
Enjoy and happy coding
This is working fine with hostgator.in shared hosting.
I have a website created using joomla 3.0 (bitnami on amazon aws). I want to publish few files (html) from the website and was wondering how to do it ? Ideally I want to keep those htmls under /opt/bitnami/apps/joomla/htdocs/storage/matrix.html and then access it from my site using url : /storage/matrix.html
Any clues ?
I found the solution myself after trying out a few things. What I did was created a new directory called storage under htdocs (of my joomla installation) and then also copied a htaccess.txt file inside it (from another public folder). And that's it ! This directory is now public and I can access it like I wanted !