差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
it:server:nginxserver [2022-08-09 10:22] – [Nginx Proxy Manager] goldentianyait:server:nginxserver [2025-12-30 14:51] (当前版本) – 移除 goldentianya
行 1: 行 1:
-====== Nginx 服务器 ====== 
-主要关于Nginx服务器安装、维护等事项。或者通过 Docker 来管理 [[https://nginxproxymanager.com/|Nginx Proxy Manager]] {{fa>file-text-o}}(([[https://blog.laoda.de/archives/nginxproxymanager|Doc]])) 
  
-===== 安装 ===== 
-安装和多域名设置,主要参考以下文章:(([[https://ubiq.co/tech-blog/configure-multiple-host-names-nginx/|How To Configure Multiple Host Names in NGINX]])) (([[https://hackprogramming.com/blog/how-to-setup-subdomain-or-host-multiple-domains-using-nginx-in-linux-server|How to setup subdomain or host multiple domains using nginx in linux server]])) 
-(([[https://hackprogramming.com/how-to-setup-subdomain-or-host-multiple-domains-using-nginx-in-linux-server/|Subdomain in Nginx]])) 
-(([[https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04-quickstart-de|Installl Nginx on Ubuntu]])) 
-(([[https://www.youtube.com/watch?v=liA6Wg-mm2M|Install Video]])) 
-(([[https://blog.csdn.net/longgeqiaojie304/article/details/84984564|Nginx虚拟主机多host域名配置演示]])) 
-按照步骤去做就好,没有太复杂。 
- 
-<code> 
-sudo apt update 
-sudo apt install nginx 
- 
-sudo systemctl status nginx 
-sudo systemctl reload nginx 
-</code> 
- 
-安装完并修改配置文件后,检查配置语法是否正确 
-<code bash> 
-sudo nginx -t -c dokuwiki.conf  # 测试配置文件是否有效 
-sudo nginx -t                   # 测试所有设置 
-</code> 
- 
-端口配置 
-<code bash> 
-sudo ufw allow 'Nginx Full' 
-sudo ufw enable 
-sudo ufw status 
-sudo ufw allow ssh # 很重要,否则 SSH 登录会被拒绝 
-</code> 
- 
-如果出现502拒绝访问,大概是因为php解释服务没有安装。参考 [[https://www.datadoghq.com/blog/nginx-502-bad-gateway-errors-php-fpm/|NGINX 502 Bad Gateway: PHP-FPM]] 
-<code bash> 
-sudo apt -y install php7.4 php7.4-fpm # ubuntu 20.04 上只支持 7.4 版本 
-</code> 
- 
-出现 “//PHP function xml_parser_create// ” 错误,是因为 php-xml 包没有安装。 
-<code bash> 
-sudo apt-get install php-xml 
-</code> 
- 
-====== SSL 证书 ====== 
-请参阅 [[it:server:security#'SSL 证书'|服务器安全设置]] 笔记中的记述。以开通''https''的安全访问模式。 
- 
-标准配置供参考 
-<code> 
-    server { 
-        listen       443 ssl http2 default_server; 
-        listen       [::]:443 ssl http2 default_server; 
-        server_name  你的域名,多个以空格隔开; 
-        root         你的博客静态资源路径; 
- 
-        ssl_certificate "你上传的 .pem 源证书的路径"; 
-        ssl_certificate_key "你上传的 .key 私钥文件路径"; 
-        ssl_session_cache shared:SSL:1m; 
-        ssl_session_timeout  10m; 
-        ssl_ciphers PROFILE=SYSTEM; 
-        ssl_prefer_server_ciphers on; 
- 
-        include /etc/nginx/default.d/*.conf; 
- 
-        location / { 
-        } 
- 
-        error_page 404 /404.html; 
-            location = /40x.html { 
-        } 
- 
-        error_page 500 502 503 504 /50x.html; 
-            location = /50x.html { 
-        } 
-    } 
- 
-</code> 
- 
-====== 反向代理 ====== 
- 
-当访问 http://192.168.17.129:9001/deu/a.html 时,会引导到 http://127.0.0.1:8080 
-<code > 
-server { 
- listen       9001; 
- server_name  192.168.17.129; 
- 
- location ~ /edu/ { 
- proxy_pass  http://127.0.0.1:8080 
- } 
- 
- location ~ /vod/ { 
- proxy_pass  http://127.0.0.1:8081 
- } 
-} 
- 
-</code> 
- 
-====== Nginx Proxy Manager ====== 
- 
-[[https://lurenjia.top/2022/02/install-nginx-proxy-manager/|安装Nginx Proxy Manager]] / [[https://www.jianshu.com/p/eb945b4769f2|可视化配置Nginx]] 
- 
-出现错误 <wrap em>ERROR: no matching manifest for linux/s390x in the manifest list entries</wrap> 
-  > docker pull s390x/node 
- 
-{{tag>nginx}} 
it/server/nginxserver.1660040546.txt.gz · 最后更改: 2022-08-09 10:22 由 goldentianya
回到顶部
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0