scoop, PHP, NGINX are necessary

Create VHost

An example with Laravel PHP 8.2.

You have to edit NGINX conf in scoop apps directory.


# ...

http {
  # ...

  server {
    listen 80;
    server_name app.laravel.test; # URL to use on browser
    root "C:/workspace/laravel/public"; # Path to Laravel application
    index index.php index.html;

    location / {
      expires -1;
      try_files $uri $uri/ /index.php?$query_string;

    location ~ \.php$ {
      fastcgi_pass; # here to use PHP 8.2 with NSSM
      include fastcgi.conf;

Edit Windows hosts

To use VHost on Windows, you have to edit hosts file, to add your new app URL.

# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.

# localhost name resolution is handled within DNS itself.
#       localhost
# ::1             localhost       app.laravel.test
::1             app.laravel.test

This file is under protection by Windows, you have to accept "Retry as Admin..." on VSCode and save again.

And now your application is available at http://app.laravel.test.