Does Laravel Homestead come with Nginx or Apache installed? - laravel

I am very new to Laravel and i love coding locally so of course i am using Homestead. Does Homestead use Nginx or Apache? A question before i send my site online when i get it completed.
Laravel 5.6 is the current and latest. I am using that. I am also using the latest version of Homestead as of 5/7/2018.

By default Homestead goes with Nginx but it's also possible to use Apache.
You can read more about it here: https://laravel.com/docs/5.6/homestead :
Homestead uses the Nginx web server by default. However, it can install Apache if apache is specified as a site type. While both web servers can be installed at the same time, they cannot both be running at the same time. The flip shell command is available to ease the process of switching between web servers. The flip command automatically determines which web server is running, shuts it off, and then starts the other server. To use this command, SSH into your Homestead machine and run the command in your terminal:
flip

Related

laravel production in windows server

im new in laravel and i have done my first project, I have xampp,mysql and windows server 2012 (installed with composer and laravel 7). i'm running the application in server via command below
php artisan serve --host=[ip] --port=[port]
application is running fine within the network. However, it seems super slow. I'm not sure if this the correct way of deploying it into production. Do you have any recommendation/instructions where can i run/deploy apps within the resource that I have.
Speed of your laravel project depends on many parameters like hardware config (CPU,RAM,...) and also number of users and level of requests and processes. But consider that for an app in production it's better to not use php artisan serve command. It's only for development environment. I don't that how much you know about linux but I suggest you to change your stack and use linux as your production os with nginx as web server alongside php-fpm for running your app in production. But for now you should config xmapp's apache web server to run your application from project's public folder. Here is a link you can use: https://insidert.medium.com/setting-up-laravel-project-on-windows-2aa7e4f080da
good luck

How to deploy a laravel application that will be accessed over a LAN on a windows server?

I am tasked to develop a laravel project for our company. I have to deploy it within the company's network only. It is my first time to do it and haven't find any good source of instruction so far. I hope you can help me with this. I am using XAMPP for this one. And the machine runs on a Windows Server 2016.
Laravel applications are easy to install on IIS. You can use the url_rewrite extension to import the rules from the .htaccess file. Other than that it is really no different than deploying to any other server.
You can also use your company's local DNS to point to the server if you wish to access it via https://my-app.company.com.
May sure you all are one in common network
sudo php artisan serve --host 0.0.0.0 --port 81 (you can change the port if you want)
Other people will be able to access with you'r IP address http://your-pc-id-address:81

Configuring PHP development environment

After a long time of using LAMP and WAMP, I've decided to try out Docker (buying new hard drives today, so why not?).
I've managed to create containers for my website and everything works fine.
Content is updated, database is saved to the folder (so kind of persistent), however, I've read that it is possible to automatically start the project containers using integration inside the PhpStorm.
And here are the problems:
I am using Windows 10 Professional with Hyper-V enabled
Docker running as a service
Docker in Windows using NPIPE (Named Pipes)
PhpStorm only works with tcp:// unix:// URI
Tried to use socat to map pipe to tcp and failed (either device is busy, or unable to send 'send' command, or any other error, you name it)
Tried to start the Docker daemon using the configuration file with hosts set to pipes and tcp - failed again (guess it is only works for Azure)
Can someone give me a link to the detailed configuration of the Docker on the Windows or should I just fallback to WAMP, because I REALLY don't want to install VMWare or VBox on my machine, neither I want to use out-of-the-box solutions for hosting local WAMP server (XAMPP, Open Server, Denver, etc), I just don't trust them.
Here's what we have:
1) https://www.jetbrains.com/help/phpstorm/docker.html
2) https://www.jetbrains.com/help/phpstorm/docker-2.html
3) https://confluence.jetbrains.com/display/PhpStorm/Docker+Support+in+PhpStorm
4) https://github.com/JetBrains/phpstorm-workshop - you can checkout docker branch. This project contains some examples/tutorials you can try right inside IDE
If that doesn't help at all - please attach/describe an error message you're getting in IDE.

Laravel app running on Homestead - how to access it on a mobile device?

I'm running an app on Laravel Homestead. My OS is Windows 7. The hosts file:
192.168.10.10 myapp.dev
My PC uses the LAN Internet connection.
Now, I would like to be able to access myapp.dev on a mobile device.
I have tried this (1), as well as that (2). None of these worked for me. If I use the php artisan serve approach (link 1), my IPv4 gets rewritten to myapp.dev, and the site cannot be found.
How do I access my Homestead-based app on a phone?
Homestead 5.x
As of Homestead 5.x, ngrok software is included in your homestead environment. You can use the share myapp.dev command to fire off ngrok to listen for myapp.dev. Please refer to the Laravel Homestead documentation (Sharing Your Environment)
Homestead versions without ngrok included
You can change your nginx configuration file to listen on all requests and use your local IP http://yourip:8000 instead of myapp.dev, but the easiest way to archive this is by creating a secure tunnel to your machine with software like ngrok.com
With your local domain myapp.dev you can basically run the following command after you served your webserver:
ngrok http 192.168.10.10:80 -host-header=myapp.dev
ngrok will generate a secure url which is available on your local network, but also publicly so you can share it with your friends/colleagues.
source

How to get Laravel homestead on server

I already have a running server and i just want to get laravel homestead on it.
All the tutorials are about how to install it on a localmachine or on a virtual machine.
Homestead is VM box, it was created to copy usual server environment for using on any local machine. You absolutely do not want to use it on your server for production.
According to the Laravel Docs Homestead is intended to use only in the local development.
It is just a pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, HHVM, a web server, and any other server software on your local machine.
Source : Laravel Docs
You may need to look on the forge which does the same on production server.
You can learn more about forge here

Resources