IT俱乐部 Nginx 在linux中安装nginx及在树莓派ubuntu中安装nginx的方法

在linux中安装nginx及在树莓派ubuntu中安装nginx的方法

安装

sudo apt-get update
sudo apt-get install nginx

若是报错尝试查找依赖

sudo apt-cache showpkg nginx

然后使用

sudo apt-get update
sudo apt-get install 

dependency-name是依赖名称,同时需要去掉尖括号

nginx的配置文件位置

cd /etc/nginx/
sudo cp nginx.conf nginx.conf-save
sudo nano nginx.conf

切换并备份一个nginx的配置文件,再打开。
备份的文件名称是nginx.conf-save,nginx会读取的是nginx.conf

nginx的nginx.html文件位置

cd /etc/www/html/
sudo nano index.nginx-debian.html
切换并打开默认html文件

到此这篇关于在linux中安装nginx及在树莓派ubuntu中安装nginx的方法的文章就介绍到这了,更多相关linux ubuntu安装nginx内容请搜索IT俱乐部以前的文章或继续浏览下面的相关文章希望大家以后多多支持IT俱乐部!

本文收集自网络,不代表IT俱乐部立场,转载请注明出处。https://www.2it.club/server/nginx/17562.html
上一篇
下一篇
联系我们

联系我们

在线咨询: QQ交谈

邮箱: 1120393934@qq.com

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部