Download the PHP
package masfernandez/nginx-proxy-local-development without Composer
On this page you can find all versions of the php package
masfernandez/nginx-proxy-local-development. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor masfernandez Package nginx-proxy-local-development Short Description Easy management for SSL/TLS certificates and proxying local webservers for fast development setups! License
MIT
FAQ
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
Informations about the package nginx-proxy-local-development
## About The Project
I created this repository to speed up the initial configuration of local development environments, allowing the management of SSL/TLS certificates and local web servers.
**Features**
- Multiple local webservers on different ports behind the reverse proxy server.
- Run local applications under SSL/TLS (for the development of a PWA with a serviceworker or Vue under SSL/TLS for example).
- 100% trusted certificates for browsers, curl and other applications.
In combination with services such as xip.io (What is xip.io? please read documentation here: [http://xip.io](http://xip.io)), allows also:
- No more /etc/hosts file editing
- Develop and test several local applications (webservers) from external hosts without complicated configurations
- Free alternative to Ngrok, Serveo, etc. (require some NAT configuration on router)
## Getting Started
The settings shown in this document are valid in a macOS environment, since the variable "host.docker.internal" is used to map the host's IP from the proxy container. This variable does not work on Windows or Linux.
Expiration dates for included content:
- Certification Authority: October the 3rd, 2023 at 20:00:11 CEST
- Wildcard xip.io certificate: December the 13rd, 2021 at 19:22:47 CEST
### Prerequisites
- docker
- openssl (only for custom ca or certificates)
- composer (when used as a composer dependency, obviously)
### Installation
As standalone tool:
As composer dependency:
## Usage
Valid for reaching local webservers located at 127.0.0.1:<any port> (your computer) with an url domain like https://<whatever>.127.0.0.1.xip.io
Choose any subdomain on xip.io service for reach your great app (like backend.127.0.0.1.xip.io).
In short, that subdomain will resolve to your local computer without editing /etc/hosts file. You can check it out now:
If you prefer using your custom SLD like my-cool-app.com instead <whatever>.xip.io, you can also use this repo to generate your own custom CA and certs. The main drawback of this is that you will have to point my-cool-app.com to the 127.0.0.1 IP by editing the /etc/hosts file. Choosing this way I recommend using [Gas Mask](https://github.com/2ndalpha/gasmask).
### Fast usage as standalone tool
Configure the Nginx vhost example located in docker/nginx/conf.d/backend.127.0.0.1.xip.io.conf as your needs.
That vhost example is using:
- Subdomain: backend.127.0.0.1.xip.io
- Local webserver running at 127:0.0.1:8080
- Nginx proxy from -> backend.127.0.0.1.xip.io to -> 127:0.0.1:8080
Build and run docker container:
That's it! you can reach your local app at https://backend.127.0.0.1.xip.io.
Enjoy the development :)
### Fast usage as composer dependency
Create a docker-compose.yml file in the root of your project or integrate bellow service to your already current stack:
Full example docker-compose.yml file for your reference:
Build and run docker container
That's it! you can reach your local app at https://backend.127.0.0.1.xip.io.
Enjoy the development :)
## Other configurations and customizations
If you want to generate your own CA, custom certificates or advanced configurations, please read bellow sections.
### Local webservers running in containers
When you are running the apps on local webservers under docker containers, there is already a great tool to act as a proxy and reach each service properly. Have a look at:
https://github.com/nginx-proxy/nginx-proxy
Also, you can use nginx-proxy/nginx-proxy in combination with masfernandez/nginx-proxy-local-development:
- nginx-proxy/nginx-proxy acting as a reverse proxy server to local webservers in docker
- masfernandez/nginx-proxy-local-development for generating custom trusted ssl/tls certs in development
### Create and install your custom Certificate Authority
`
It will ask for sudo password to install on macOS keychain to avoid apps (browser, curl, etc.)
complain that 'it's self-signed or has not been verified'
Firefox browser require manually installation.
### Generate single domain certificate
`
Examples:
`
If you prefer not using xip.io, still can generate your custom trusted certificates for local development:
`
### Generate wildcard certificate
`
Examples:
`
If you prefer not using xip.io, still can generate your custom wildcard trusted certificates for local development:
`
Valid for domains like web.my-new-site.com, backend.my-new-site.com, etc.
### Wrong wildcard certificate
`
Actually is not wrong at all, but this depth level of wildcard is destined to configure the host IP to resolve on xip.io DNS, like for example 192.168.1.10.xip.io will resolve at 192.168.1.1 IP on your local network.
Using the above wildcard certificate you will have to run each webserver on a different IP of your network. We want all webservers availables at locahost for development.
Explanation here: [Stackoverflow](https://serverfault.com/questions/933374/can-a-wildcard-ssl-certificate-secure-host-names-of-various-depths)
### Validate cert
Example:
### Basic Nginx configuration
Configure Nginx for using the files generated in previous steps. Example:
## Roadmap
See the [open issues](https://github.com/masfernandez/nginx-proxy-local-development/issues) for a list of proposed features (and known issues).
## Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License
Distributed under the MIT License. See `LICENSE.txt` for more information.
## Contact
Miguel Ángel Sánchez Fernández - [email protected]
Project Link: [https://github.com/masfernandez/nginx-proxy-local-development](https://github.com/masfernandez/nginx-proxy-local-development)
## Acknowledgements
* [xip.io](http://xip.io/)
* [docker](https://www.docker.com/)
* README template based on: [https://github.com/othneildrew/Best-README-Template](https://github.com/othneildrew/Best-README-Template)
* CHANGELOG template based on: [https://keepachangelog.com/en/1.0.0/](https://keepachangelog.com/en/1.0.0/)
[version-shield]: https://img.shields.io/github/v/release/masfernandez/nginx-proxy-local-development?style=for-the-badge
[version]: https://github.com/masfernandez/nginx-proxy-local-development/releases
[contributors-shield]: https://img.shields.io/github/contributors/masfernandez/nginx-proxy-local-development.svg?style=for-the-badge
[contributors-url]: https://github.com/masfernandez/nginx-proxy-local-development/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/masfernandez/nginx-proxy-local-development.svg?style=for-the-badge
[forks-url]: https://github.com/masfernandez/nginx-proxy-local-development/network/members
[stars-shield]: https://img.shields.io/github/stars/masfernandez/nginx-proxy-local-development.svg?style=for-the-badge
[stars-url]: https://github.com/masfernandez/nginx-proxy-local-development/stargazers
[issues-shield]: https://img.shields.io/github/issues/masfernandez/nginx-proxy-local-development.svg?style=for-the-badge
[issues-url]: https://github.com/masfernandez/nginx-proxy-local-development/issues
[license-shield]: https://img.shields.io/github/license/masfernandez/nginx-proxy-local-development.svg?style=for-the-badge
[license-url]: https://github.com/masfernandez/nginx-proxy-local-development/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/masfernandez
All versions of nginx-proxy-local-development with dependencies
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package masfernandez/nginx-proxy-local-development contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.