Installing Laravel 5 application on DirectAdmin VPS - php

I read and tried several methods and none worked. I always get either 400 or 500 error. The app works perfectly on localhost.
What are the exact steps in order to get Laravel 5 up and running on a VPS with DirectAdmin CP??
Please don't link to other questions as I read them all. Some don't even work with Laravel 5 anymore.
Note: DirectAdmin sees public_html as the document root.
I have SSH root access and Composer is installed.
VPS Configs: Apache 2.4.9 and PHP 7.0.3.

Turns out DirectAdmin has a section where you can define custom Apache configs (including Document root). So here are the steps:
1- Login to your admin area (as System Admin)
2- From Extra features select Custom Httpd Configurations
3- Select the domain you want to config
4- In the textarea at the top enter the following:
|?DOCROOT=/home/username/domains/example.com/public_html/public|
5- Click save. Now wait for a minute or two and voila! It works.
Obviously you need to change the username and example.com according to your setup.
Read more about this feature.

Related

SOS! How do I deploy multiple Laravel apps on a windows IIS server in a LAN

I am setting up an IIS server in readiness to host multiple PHP web apps. These will be used within our local network so no need internet access. I have read a lot of stuff on how to go about it but am getting lost even more. someone please help.
You can refer to this document for detailed steps about deploy php application on IIS.
Here are some main important points:
Install IIS in control pannel(windows) or server manager(windows server).
Configure php. Youcan download it from php official website or Web PI(more recommand). The version over php8 may not work on IIS.
Make the physical path of site points to root folder of application. It will auto generate web.config. Set the permission of root folder to avoid 500 error.
If you have multiples version of php, you can isntall php manager to configure them.

How to update functionalities of a live Laravel web application?

I have a Laravel application. It's live and have daily users. I need to update some features. Not only front end work. Have to change back end too. With database. The problem is our old developer created this site. Now he's not here, and also no any documentation or blue print available. I downloaded the project. I can change front end even it's live. Changes affected. Is there any way to change some back end and database when it's live ? Is that a risk ?
Please guys don't give minus points to this question.
You should be creating a development environment on your local machine, with it's own database etc. Change that, test it, and once you are happy, upload your file and schema changes.
For setting up a quick dev environment that closely matches your production server, download VirtualBox and Vagrant. Then visit http://puphpet.com, which will allow you to generate a server config.
Unzip the config, cd into the folder, and type vagrant up. Your server is now on 192.168.56.101.
Lastly, edit your OS hosts file to point your.dev.site.com to that ip. (the default domain name in puphpet is awesome.dev
You can get inside the VM by typing vagrant ssh if you need to.
Don't edit a production site, especially with live users!

Google Cloud Bitnami Magento 2.0.6 stack

Magento 2.0.6
Bitnami stack
Google compute Instance.
So after going up and down through all support for Bitnami Magento stack on the web, I decided I am the only one with this issue.
So I had my site running flawlessly with the Stack 2.0.6 given by Bitnami through the Cloud Launcher then I added an extension to setup the outgoing emails. And now I am unable to access my website using the domain name. If I enter my Domain name on any browser or computer it takes me to "Apache2 Debian Default Page" if I add /index.php to my Domain name it takes me to a semi loaded version of my Magento store. If I attempt to go to domain/admin it tells me, basically a 503 error.
There has been an error processing your request
So then I went through all my folders on the cloud and tried finding that index.html it loads with just the domain name and deleting them. After finding and deleting them it still loads the "Apache2 Debian Default Page". Very frustrating.
So I decided to take a break then come back and thought maybe somehow the conf files are telling it to only open index.html first. So I went through all the configs and nothing is directing it that way.. so it seems everything loads correctly in the cloud instance no errors on the back end starting or restarting Bitnami script just the front end is broken somehow apache2 isn't reaching the Magento folder correctly.
Then I decided, well if all else fails I will start a new Cloud instance with the new 2.0.7 Magento Bitnami. Wrong instantly upon setup it directs the domain straight to "Apache2 Debian Default Page" except if add /admin to the fresh instance loads the backend and only loads the front end if I manually add /index.php to the domain name.
Am I missing something?
it has configuration in
/opt/bitnami/apps/magento/conf/
make sure to make changes in that
you can change DirectoryIndex index.php in htaccess.conf
after that you can restart the apache by
service bitnami restart apache

How to deploy symfony 2 app

I am new to symphony2 and I need to know how can I make my application run without the server:run commmand. What do I need to do to be able to make it run inside the root folder of my nginx server on port 80?
There are several steps you need to do.
1. Install Apache or similar web server on your hosting server.
2. Create a virtual host which points to the directory where your Symfony app is.
3. Allow proper permissions to folders.
4. Run your web server from specific console command.
Refer following two URLs for more details:
http://symfony.com/doc/current/cookbook/deployment/tools.html
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-symfony-application-to-production-on-ubuntu-14-04

Deploy SSL-enabled website to WHM-managed VPS

I've built a website (PHP5, HTML5, CSS3, node.js, MySQL 5) that works fine - it requires SSL - I coded it to reload users with https if they're not already using it. I have deployed this site successfully to many linux servers before - I know how to do that but - I need to deploy this to a VPS that has WHM on it.
I studied WHM. What i've done so far at a high level:
added an account for say xyz - with shell access
ssh/ftp into that account using the ip-address of the VPS
install code in /home/xyz/public_html with 755/644 permissions
built a custom php.ini in /home/xyz/public_html with needed settings
mysql -u root - set root password and added database/user xyz and grant all on xyz to user xyz
MySQL Workbench into the VPS using SSL user xyz - set up database xyz
pointed the xyz domain at the IP address of the VPS
The website works for http but for https all I get is 404 Not Found. I expect it's looking in the directory where WHM is installed for those assets. I cannot see the apache logs to confirm this.
From what I know about SSL you can only have 1 website on a server that uses SSL. WHM is the one website on this server that is already using SSL.
This dawned on me - a duh moment when I got my first 404.
I've searched everywhere and found nothing - what i've managed to guess so far is that I will have to do this thru WHM - I need to:
add an IP-address in WHM - I see where to do that but do I just make one up? do I have to call GoDaddy and get them to give me one? or buy one?
move my xyz account to that IP address in WHM - I see where to do that
and then somehow get DNS servers to go to that IP instead of the IP of the VPS. This is where it gets over my head
I've searched for days and all I can find anywhere is tons of articles on installing SSL certificates. I'll get to that point eventually but for now I just want my website to work. Am I moving in the right direction?
I apologize for the long question I'm trying to demonstrate that I have researched this and tried everything I know. Thanks.
Usually, in a WHM server, the logs for a domain/s are located in the /usr/local/apache/domlogs directory. Check those.
Generic error logs for Apache are in the /usr/local/apache/logs/ dir.
With WHM you can install SSL certificates as much as you want. It has SNI enabled by default.
I cannot guess what your problem is without access, so you should start with your log files and go from there.

Categories