Access PhpStorm web server (Laravel) via LAN - laravel

I have a Laravel Project that I develop in PhpStorm. I use the build in PhpStorm web server for development and debugging. (localhost:8000) Now I need to be able to access that server from another device within the same network.
Google search and jetbrains.com have not been very helpful. I have tried this (https://intellij-support.jetbrains.com/hc/en-us/community/posts/207020155-phpstorm-and-http-server-localhost-only-) but it did not work.
Any help?
EDIT:
I found the problem. Since the web server is launched via artisan, it ignores my PhpStorm settings. I needed to change the launch parameter, like so:
php artisan serve --host=0.0.0.0 --port=8000

Related

Laravel - Access For Devices on Local Network

I've developed a web-application and I'm having trouble hosting it through a server, in order to give access to other users connected over the Local Network.
WINDOWS SERVER 2012
LARAVEL
PHP 7.2
NODE
MYSQL
When running the web application over localhost with the following command all files load correctly. (CSS, images etc..)
php artisan serve
However, when I've tried running the application over my ip address, no files load correctly and console logs the following errors for APIs net::ERR_CONNECTION_CLOSED
php artisan serve --host='my-ip' --port=8080
Command Prompt shows following error
Error Invalid request (Unsupported SSL request)
Testing was through Chrome Web Browser.
Any help would be greatly appreciated!
Have a good day :)

Laravel 9 on IIS returns 500 server error when "php artisan serve" on same server works

I am trying to deploy a Laravel 9 site onto an IIS Server (and no, I don't have the option of using a Linux server). If I run the local server setup with "php artisan serve", it works fine through 127.0.0.1 on the server, including all calls to the database.
However, if I try to run the site through the IIS server via its domain name, I get a 500 server error. Failed Response Tracing shows a FASTCGI_UNKNOWN_ERROR: "The directory name is invalid. (0x8007010b)"
The DNS is functioning properly as I have tested a phpinfo page on it.
Is there a configuration in IIS I need to set in order for the Laravel site to work?
The problem is not clear, but try to point IIS directly to public folder of Laravel, like this:
Hope this helps!
It turned out I didn't have my php-cgi.exe file mapped accurately in IIS. I had to edit my Handler Mappings and link the FastCgiModule handler to my current installment of PHP, mapping it to the php-cgi.exe file.

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

PHP Server Proxy to use in Windows Server Plesk Hosting without command access

Im searching for some time for a php proxy application to run in my hosting running Plesk over Windows Server.
What I really need is a personal proxy server using my hosting services that allows me to use a server:port configuration on my applications. I dont want a online proxy page, because I need a proxy to setup server:port on my application.
its a "light proxy", obviously I dont wanna burn the ip used for my hosted website.
I tryed search for squid, tinyproxy, 3proxy, miniproxys and even Glype, but some are just for linux and other provide just a online proxy page, not a port config.
I don't have command prompt access that is why Im looking for a PHP solution, but it could be any solution than PHP to.
Thanks in advance guys!
Marcelo

Resources