Deploy laravel 5 on Google Compute Engine - php

I'm using laravel 5 and trying to deploy on GCE VM Instance.
I have an existing project and using git. I've pulled my code to /var/www/ , but when I tried to access to the path http://my-ip/my-project it showed a list of directories instead.
I've also tried install a new laravel 5 into /var/www, but still result the same. Although if I go to my-ip/laravel/public it show the laravel 5 welcome page. But if I go to my-ip/laravel/public/home it showed 404 not found (/home is the route provided by laravel 5)
Can anyone help please?

Related

How to include a Project from a server into a Laravel sail docker image

I am totally new to PHP / Laravel / Linux / composer / docker etc.
However I do have the task: go retrieve some code files from an internal server and make a docker container out of it. The project is written in PHP 7.1.3 and uses the Laravel framework.
I've copied the whole https folder from the server which I think contains everything I need.
I also was able to create the example app from the Laravel documentation and also I made a brand new Laravel project. However, is there any chance to "generate" a new project using all the code files I have right now?
I even have a composer.json and composer.lock file, which in my opinion should "list" every component I would need in my docker installation, right?
What also bugs me is that I can't even get the project working on my dev machine...
I think you should do this step by step. But let me first answer some of your questions.
If "https" folder contains similar folder structure like fresh Laravel installation, it is likely to be all of it. But we can not be sure about it.
As far as i know there is no way to generate new project out of your files. First of all you need to know which Laravel version project uses. It must be stated at composer.json.
In you composer.json file lists required packages for you project. When you install them this packages are installed folder called vendor
Here is my suggestions;
As you stated it seems you are very new about these topics if someone give these task to you its not a smart way to teach this kind of topics.
I think you have to start with running project in your local machine. If you get errors than ask them in a new question. Most likely you need database and you need to know running migrations seeds etc.
When you manage to run the project you can start dockerizing your project. If your project is build with newer versions of laravel you can easly use sail otherwise you can build own dockerfile or upgrade laravel to newer versions.
Your problem is too broad, i think you cannot find answers to such question.

Laravel 5.1 + phpsysinfo - how?

I'm currently experimenting with Laravel 5.1
I want to display realtime resource usage and thus I found phpsysinfo. I've required it into my project via composer and I'm able to run and view a working version by viewing phpsysinfo's root directory.
How do I actually then start displaying this on my /public pages ? I can't see any type of syntax on phpsysinfo's documentation.

How to host laravel 5 project in subfolder of real web server for staging?

I am newbie to Laravel. Now I am doing my very first project of Laravel 5. It is a small project.
I already developed it as beta version. Now I need to show it to my client. So I need to do staging.
I have to host it on the subfolder of our company website. For example, I need to host it in {domain}/{project_name} folder. How can I do it properly?
You just need to configure the webserver to point at the .../whatever/{domain}/{project_name}/public directory.
And of course - set proper permissions for storage, run composer install, configure your db and run your migrations, etc.

Move Laravel project to another system

I tried to move my laravel 4.1 project from my office system to my personal laptop and I have tried it using various methods:
1) git and bitbucket
2) zipped whole folder and copy
3) using composer install/update on laptop directory to update my dependencies
Neither of the above has worked for me.
I do see my landing page but on clicking any link, it shows:
Not Found
The requested URL was not found on this server.
Seems like some routing error but I do see my index page. Thanks in advance.
It must be a problem with the url rewriting on your system . make sure you fix your htaccess/nginx directives . and also make sure configurations such as mod_rewrite is enabled .
In future try using laravel homestead , so that you have consistent environment across various workstations. It's the recommended way of working using laravel.

Trying to run a Symfony project on my computer

I'm trying to run a Symfony project that I cloned from a GitHub. I've never used Symfony before but I'd like to run the project.
I read you needed to run frontend_dev.php so I ran that in to my browser:
C:\Users\Computer\Desktop\Project\WebInterface\web\frontend_dev.php
But just got a blank page with some PHP on it. I believe I may have to set up a web server but I'm not sure and figured I'd ask here first.
If I wanted to run the project from my computer, would I just download an Apache server and drop it in the root directory? What variables and files would I need to change to get it working properly? Do I need to forward any ports?
Symfony 1.x branch is not supported anymore. Use Symfony 2.
Anyway, concerning your question: here is the doc for 1.4: Day 1: Starting up the Project

Categories