Ubuntu 下安装nginx,以及首页展示

注意下环境,不同环境下的操作可能会有差别

Ubuntu: 

root@bmd-miot-c:/home/gpmbio# cat /proc/version
Linux version 4.15.0-108-generic (buildd@lcy01-amd64-013) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #109-Ubuntu SMP Fri Jun 19 11:33:10 UTC 2020

nginx:

root@bmd-miot-c:/home/gpmbio# nginx -v
nginx version: nginx/1.14.0 (Ubuntu)

查看nginx.conf配置文件目录

输入命令

# nginx -t

返回结果包含配置文件目录

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

查看nginx进程

gpmbio@bmd-miot-c:~$ ps -ef |grep nginx
root      9809     1  0 Jul02 ?        00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
root      9812  9809  0 Jul02 ?        00:00:00 nginx: worker process
root      9814  9809  0 Jul02 ?        00:00:00 nginx: worker process
root      9816  9809  0 Jul02 ?        00:00:00 nginx: worker process
root      9817  9809  0 Jul02 ?        00:00:00 nginx: worker process
gpmbio   23727 23283  0 01:13 pts/1    00:00:00 grep --color=auto nginx

 

安装以及设置首页显示

卸载方式

Nginx 出现 403 Forbidden 最终解决方法

附:

配置修改方法,https://www.cnblogs.com/tujietg/p/10753041.html

可惜没生效,但还是要继续研究的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值