How to configure Laravel on remote server - php

I'm new on Laravel. Installed laravel on my remote server ubuntu14.04. I create a project on /www/html as blog. Then run
php artisan serve --host=10.x.x.12 --port=8010.
#Laravel development server started: <http://10.x.x.12:8010>
Its ok . I can access laravel from my local windows with that link.
The problem is I use putty for remote access. When I closed putty, I can't access anymore 10.x.x.12:8010.
How to use laravel server continuously from remote server.

Use nohup (man page) so the program does not exit when the terminal session ends.
nohup php artisan serve --host=10.x.x.12 --port=8010 &

Related

How to use Supervisor to run Websocket server on AWS Lightsail instance

I'm using this library to add websockets to my codeigniter app. I got everything to work, but I need the websocket server to always run in the background, regardless of the CLI being open or not.
To run the server in the CLI, I run this command:
php index.php welcome index
Which gives me:
Running server on host 0.0.0.0:8282
Authentication activated
Websockets works on my app, but if I close the CLI, the server closes as well. How do I keep this running? I have Supervisor (as suggested for Ratchet), but I have no idea where to go from here. I'm just running a simple PHP server (Ubuntu on AWS Lightsail), not a node one, bytheway.

Apache2 and CakePHP project server deployment

Hi my CakePHP project works fine. I have pushed it to my server #www.zeyeland.com/register. So the cake app works great but I am not sure how to get my Apache2 server to run the app automatically. I have to log into my server and type bin/cake server to start it.
Some time ago, When I uploaded my NodeJS app to server I had to edit the .bashrc file and use the bash script command "cd/var/www/html/zeyeland-website/bin && pm2 start npm1 -- start and cd". This command starts my nodejs app automatically
Do I need a similar bash command with bin/cake server to run my Cakephp project automatically too?
You need to look for upstarting apache and mysql so that whenever your server reboots the services will start automatically.
Look for upstart at
https://www.digitalocean.com/community/tutorials/how-to-configure-a-linux-service-to-start-automatically-after-a-crash-or-reboot-part-1-practical-examples

Lumen server not responding after a while

I have a PHP web server powered by Nginx,HHVM and Lumen, when I start the server using this command : php artisan serv --port="8081" --host"x.x.x.x"
it will start and running perfectly for a while like two weeks max!
then it will die and not responding anything! It's not on heavy load of requests. I don't know if it's HHVM related issues or Lumen problem?!
php artisan serve is the development way of things. when you start your affirmation and say that you have a NGINX server and then say that you are using the dev server build in Laravel it's way to wrong. You need to configure NGINX to serve the Lumen app with it (example of linux server, nginx and lumen). I hope the example will clear your vision on this situation.

Laravel 5 application moved from local machine to hosting server causing errors

I developed an application in laravel 5.0 in local machine using xampp and it's working fine. After i uploaded the project to hosting server using ftp now i am getting following errors one below the other.
The issue is you don't have right permission on project/storage/framework/sessions folder, so give the permission to 0777 i.e read write execute and after that run the following command:
php artisan config:cache
through terminal or putty on server and every thing will be fine.

Symfony - Applications run without Apache server

I used to think that the internal web server which SYMFONY uses is part of APACHE server, which runs with the following command:
$ php bin/console server:start
But as I turn off the Apache server on my PC (windows 10) the internal web server still producing without any problems, so is it that the internal web server has nothing to do with the Apache server or it's something unusual?
PHP provides a standalone built-in web server.
You can try it by running php -S localhost:3000 -t web at the root directory of your project then browsing http://localhost:3000/app_dev.php.
All commands that are part of the server:* namespace are related to the PHP built-in server.
For more informations, look at the command directly.
it is using PHP build in server

Categories