首页 > 系统服务 > 详细

ubuntu 安装nginx

时间:2018-11-23 17:16:50      阅读:221      评论:0      收藏:0      [点我收藏+]

1,安装nginx

sudo apt-get install nginx

启动nginx
service nginx start  启动
service nginx stop   停止
service nginx reload   重启  
service nginx restart   重新开始
service nginx status   状态

也可以用另外的方法启动
systemctl start nginx
systemctl start nginx.service
systemctl stop nginx
systemctl reload nginx
systemctl restart nginx
systemctl status nginx

PS:自己测试报错,希望有人能解决,报错如下
System has not been booted with systemd as init system (PID 1). Can‘t operate.

2,启动nginx后

看下自己的端口,ifconfig拿到ip测试下

在htm5页面上输入自己的ip,端口默认是80
1,nginx默认开始页面只想 /var/www/html文件下的页面

 

ubuntu 安装nginx

原文:https://www.cnblogs.com/52forjie/p/10008689.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!