Created
October 12, 2019 08:10
-
-
Save wrick17/482ac0e3411387076676cfefadd7feeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local ngnix server for mac to have subroutes to your localhost domain | |
# With this, if you hit http://localhost/food, it'll load localhost:8580 on that route. | |
# /usr/local/etc/nginx/nginx.conf | |
http { | |
server { | |
listen 80; | |
server_name localhost; | |
location /food/ { | |
rewrite ^/food/?(.*)$ /$1 break; | |
proxy_pass 'http://localhost:8480/'; | |
} | |
location /blog/ { | |
rewrite ^/blog/?(.*)$ /$1 break; | |
proxy_pass 'http://localhost:8580/'; | |
} | |
} | |
} | |
events { | |
worker_connections 1024; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment