<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Webserver on 自建 VPS 服务器的一些攻略</title><link>https://selfhostvps.github.io/tags/webserver/</link><description>Recent content in Webserver on 自建 VPS 服务器的一些攻略</description><generator>Hugo</generator><language>zh-CN</language><copyright>Copyright © 2025, Jane Doe.</copyright><lastBuildDate>Sat, 17 Jan 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://selfhostvps.github.io/tags/webserver/index.xml" rel="self" type="application/rss+xml"/><item><title>VPS 初始安装设置：1. Nginx &amp; Docker</title><link>https://selfhostvps.github.io/post/2003-install-nginx/</link><pubDate>Sat, 17 Jan 2026 00:00:00 +0000</pubDate><guid>https://selfhostvps.github.io/post/2003-install-nginx/</guid><description>本站向大家介绍的 VPS 管理方式，是——
在 VPS 上安装 Nginx 网络服务器和 php； 域名通过 Cloudflare 定向到 VPS； 使用 Cloudflare 自己的 https 证书； 所有其它服务，都使用 docker compose 运行在容器中，然后通过 Nginx，将每个 docker 容器的端口，对应到相应域名的 443 端口。 初期需要安装的软件包括
Nginx 网络服务器 + php 脚本语言 Docker 容器体系 1. 一些本站常用的路径设置 首先，为了以后写教程方便，在这里约定一些常用的文件夹的位置：在用户目录下创建几个文件夹，并把它们映射到根目录下。
使用上一篇创建的用户（而不是 root）登录服务器后，执行：
mkdir ~/ADMIN ~/WEBSITES ~/DOCKERS ~/tmp sudo ln -s ~/ADMIN /ADMIN sudo ln -s ~/WEBSITES /WEBSITES sudo ln -s ~/DOCKERS /DOCKERS mkdir ~/ADMIN/https-certs ~/ADMIN，管理用的程序，如 https 证书、日常维护用的脚本程序 ~/WEBSITES，直接放在 Nginx网络服务器下的各个网站 ~/DOCKERS，放置不同的 docker compose 项目 2.</description></item></channel></rss>