在linux系统上安装nginx并使用

103 阅读1分钟

1、安装nginx

yum install nginx -y

2、启动

nginx

3、如果在外网访问不到

http://39.103.165.134/

看下阿里云服务器的配置

云服务器ECS->网络与安全->安全组

XgJXbfzFew.png

zqxULRC4tE.png 4、把自己的本地文件上传到阿里云服务器

在本地

0185a47fb8e695e274a41c77da6aa09.png 5、在阿里云服务上把dist.zip进行解压缩

unzip dist.zip

4、nginx 操作

whereis

whereis nginx

./nginx -s stop 关闭nginx

ps -ef|grep nginx