Last active
September 7, 2019 01:45
-
-
Save tao12345666333/f4441176550848c065569cc74d7a8324 to your computer and use it in GitHub Desktop.
多个vue前端项目使用同一域名nginx配置
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
upstream api { | |
server localhost:6663; | |
} | |
server { | |
listen 80; | |
server_name moelove.info; | |
charset utf-8; | |
root /www/moelove; | |
index index.html index.html; | |
location /blog { | |
try_files $uri $uri/ /blog/index.html; | |
} | |
location /vim { | |
try_files $uri $uri/ /vim/index.html; | |
} | |
location ~ ^/(api) { | |
proxy_pass http://api; | |
} | |
location / { | |
default_type 'text/plain'; | |
content_by_lua "ngx.say('Hello moelove!')"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment