nuxt project deployment papers

tips: Server version is version centos7.6

- installation configuration nginx

  Not know much about the meaning of various operations, there are many online reference articles. https://www.cnblogs.com/bluestorm/p/4574688.html

  - nginx default configuration

// nginx default configuration 
Server { 
        the listen 80; 
        server_name localhost; 

        #charset KOI8-R & lt; 

        #access_log logs / main host.access.log; 

        LOCATION / { 
            the root HTML; 
            index index.html index.htm; // / usr / local index.html under / nginx / html (nginx successful installation configuration page) 
        } 
        .... 
}

  - Individuals currently nginx server configuration is as follows (in addition to the default server configuration outside)

{Server 
       the listen 8000; 
    # the listen somename: 8080; 
       server_name localhost; 

       LOCATION / ADMIN visit {// ip: 8080 / admin will indexhtml file / var / www / admin at the time of 
        # root HTML; 
           Alias / var / www / admin ; 
           index index.html index.htm; 
       } 
    }

 - Install nodejs, yarn, pm2

  

curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash - // download the source files 
sudo yum install -y nodejs // install nodejs (the Node -v)
sudo yum install the Yarn // install the Yarn
npm install -g PM2

  

Guess you like

Origin www.cnblogs.com/laine001/p/11922027.html