阿里云nginx安装

1.登陆Linux服务器
            ssh root@ip 
            输入密码html

2.安装依赖
            yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-develnginx

3.建立一个文件夹
            cd /usr/local
            mkdir nginx
            cd nginxtomcat

4.    下载tar包
            wget http://nginx.org/download/nginx-1.13.7.tar.gz
            没有wget命令
                    yum安装
                    yum -y install wgetbash

5.    解压文件:
                tar -xvf nginx-1.13.7.tar.g
            进入文件夹  cd  nginx-1.13.7服务器

6.    执行命令,进行加载其余配置文件
            ./configure
            make
            make installssh

7.启动
            进入安装目录:/usr/local/nginx
            sbin目录下
                执行启动;./nginx 
                执行重启:./nginx -s reloadcurl

查看是否启动:curl 127.0.0.1:80
                报错:-bash: curl: command not found 
                进行云安装:    yum install curl
                默认配置文件路径:/conf 目录下的nginx.conf
        
        8. 配置nginx服务器指向tomcat服务器地址:
            location / {
                root html;
                index index.html index.htm;
                proxy_pass http://localhost:8080;
            }url

相关文章
相关标签/搜索