热门

最新

红包

立Flag

投票

同城

我的

发布
longhufu
longhufu
4 年前
truelonghufu

nginx服务器安装步骤 alt+p打开sftp 2.put ngix的jar包的本地路径 3.把jar包放到home文件夹下 4.解压jar包,5.yum下载安装依赖包 6.make和make install安装nginx
7. systemctl status firewalld.service 查看状态
systemctl disable firewalld.service 关闭防火墙
8.找到/usr/local/nginx/bin ./nginx启动nginx
------- 发布项目 ------
1.创建一个toutiao目录
cd /home
mkdir toutiao
2.将项目上传到toutiao目录
3.解压项目
unzip web.zip
4.编辑Nginx配置文件nginx-1.17.5/conf/nginx.conf
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /home/toutiao;
index index.html index.htm;
}
5.关闭nginx服务
./nginx -s stop
6.启动服务并加载配置文件
/usr/local/nginx/sbin/nginx -c /home/nginx-1.17.5/conf/nginx.conf
7.浏览器打开网址

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
系统通知怎么关闭呢?我这人有点强迫症,每天看到一个小红点很烦。
立即登录