alexwight / marquis
OSX localhost reverse proxy tool
Requires
- php: >=5.6
- illuminate/container: ~5.1
- mnapoli/silly: ~1.0
- nategood/httpful: ~0.2
- symfony/process: ~2.7|~3.0|~4.0
- tightenco/collect: ^5.3
This package is not auto-updated.
Last update: 2025-03-02 07:37:49 UTC
README
A simple way to point local domains to internal ports
Introduction
Develop on Mac OS and love docker or vagrant for local development?
Sick to death of remembering port numbers you have mapped to your VM's or containers? Join the club.
Marquis is wrapper around DnsMasq and nginx for Mac developers to point a local domain name to a port running on localhost.
Installation
Marquis requires macOS and Homebrew. Before installation, you should make sure that no other programs such as Apache or Nginx are binding to your local machine's port 80
- Install or update Homebrew to the latest version using brew update.
- Install PHP > 5.6 using Homebrew. e.g.
$ brew install homebrew/php/php72
- Install Marquis with Composer via
$ composer global require alexwight/marquis
. Make sure the ~/.composer/vendor/bin directory is in your system's "PATH". - Run the
$ marquis install
command. This will configure and install Nginx and DnsMasq.
Usage Examples
marquis site [subdomain] [target protocol] [destination port] [-- listen port]
HTTP
To access target at http://localhost:8080
$ marquis site myapp http 8080
You can now access at http://myapp.test
HTTPS
To access target at https://localhost:8443
$ marquis site myapp https 8443
You can now access at https://myapp.test
SSL Certificate is automatically generated and trusted. HTTP/2 enabled by default.
Docker example
docker pull karthequian/helloworld:latest
docker run -p 8001:80/tcp "karthequian/helloworld:latest"
Site now available at http://127.0.0.1:8001
$ marquis site howdy http 8001
Site also now available at http://howdy.test
SSL Termination
Proxy will handle the SSL termination so can handle https when the backend does not expose it, e.g.
marquis site howdy http 8001 443
Site also now available at https://howdy.tests
Problems?
I'm just using this for myself and putting this up there incase anyone else wants it. If you are using this then I assume you are a developer. Fix it and submit a pull request.
License
Marquis is open-sourced software licensed under the MIT license