服务器:
阿里云 Alibaba Cloud Linux
下载
- 进入到预计存放nginx的目录,比如:
/usr/local/
- 下载nginx压缩包,并解压
cd /usr/local wget http://nginx.org/download/nginx-1.18.0.tar.gz tar -zxvf nginx-1.18.0.tar.gz
安装
- 进入到解压的文件夹并安装
安装完成后,会有cd /usr/local/nginx-1.18.0 ./configure make -j2 make install
nginx
文件夹
配置
配置文件位置:/usr/local/nginx/conf/nginx.conf
其他的不用变,主要看server
: