https://github.com/mxrk/macos_nginx
local nginx reverse proxy for macos
https://github.com/mxrk/macos_nginx
cors docker macos nginx osx proxy reverse reverse-proxy reverseproxy
Last synced: 4 months ago
JSON representation
local nginx reverse proxy for macos
- Host: GitHub
- URL: https://github.com/mxrk/macos_nginx
- Owner: Mxrk
- Created: 2019-06-25T17:13:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-07T17:49:06.000Z (over 6 years ago)
- Last Synced: 2025-06-05T00:22:34.234Z (7 months ago)
- Topics: cors, docker, macos, nginx, osx, proxy, reverse, reverse-proxy, reverseproxy
- Language: Dockerfile
- Size: 1000 Bytes
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker image for a reverse proxy on macos
Basic Dockerfile to create a nginx reverse proxy for MacOS. At the moment I added two routes,
you can add more if you want. Simply add a new location, here is a template:
```
location /template {
proxy_set_header Host $http_host;
proxy_pass http://host.docker.internal:3000/;
}
```
# Example use cases
- Run services on your mac and access them via the reverse proxy.
- Run multiple webservers on the host machine and access them on the same port. (Can be used to prevent CORS problems).
# How to start the container?
```
docker pull mxrkw/macos_nginx
docker run -p 80:80 mxrkw/macos_nginx
```
or directly call
```
docker run -p 80:80 mxrkw/macos_nginx
```
If you want to run the container in the background:
```
docker run -d -p 80:80 mxrkw/macos_nginx
```