Score:0

How to deploy nextjs app using pm2 on cent OS 7.9 server?

US flag
Pragyan

I am facing trouble in Cent OS though.

I install nginx using yum install nginx Now the folders in nginx were missing, so I created sites-available and sites-enabled.

Then edited /etc/nginx/nginx.conf and added

http {
 ...
 ...
 include /etc/nginx/sites-enabled/*.conf;
 server_names_hash_bucket_size 64;
}

Now made the conf in sites-available nano webgenie

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        server_name XXX.XXX.XXX.XXX;

        location / {
                proxy_pass http://localhost:3000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection 'upgrade';
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        }
}

Now I created the linking using ln -s /etc/nginx/sites-available/webgenie /etc/nginx/sites-enabled/webgenie

I cloned the repo, did npm run build then did pm2 start npm --name "nextapp" -- start I still see this, when I go to URL enter image description here

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.