Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy a second strapi project to server

Deploying the first one was relatively easy, I just moved the folder to the server and using 'strapi start' and 'npm start' from linux terminal gets it up and running.

Now I would like to add an additonal strapi project to a sub directory and run in, so it's accessible from the url mysite/second-project.

But how can I run another project simultanouesly?

Thanks in advance

like image 437
sir-haver Avatar asked Sep 02 '25 02:09

sir-haver


1 Answers

You probably can't use the <Host-Name>:80 to point towards two different strapi application since they run on different ports.

What you can do is specify your ngix or apache config to redirect specific folder structure to different strapi applications on different ports.

Suppose you have one application running on port 8080 and another application on port 8181 and then configure you nginx so that the incoming urls are redirected in such way:

                  +--- host --------> strapi application on localhost:8080
                  |
users --> nginx --|--- host/second-project ---> strapi application on localhost:8181
                  |
                  +--- host/mail ---> strapi application on localhost:8282
like image 69
Shababb Karim Avatar answered Sep 05 '25 00:09

Shababb Karim