赞
踩
最近在blog部署了友链朋友圈,之前后端部署在GitHub上,现在白嫖了一台服务器,想试试部署在这上面。后端部署方案。后端部署在服务器之后,是通过ip:port访问其数据,下面要用到这个。
sudo apt install nginx
vim /etc/nginx/nginx.conf
,在http上下文内部添加server部分,并修改相应的域名、ip和端口http { # 其他配置项... server { listen 80; listen [::]:80; server_name subdomain.domain; # 设置的二级域名 root /usr/share/nginx/html; location /{ proxy_pass http://ip:port/; # ip和端口 } } # 其他 server 或配置项... }
nginx -s reload
,然后就可以通过设置的域名访问服务器端的docker数据Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。