Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

marcusmoore's avatar

Two different repositories for api.site.com and site.com?

Hello. I'm thinking ahead and the project I'm currently working on has web content at mysite.com and an api on api.mysite.com. There are two different repositories for website and the api. Would I be able to deploy this via forge?

I'm thinking I might be able to set up the two different repositories and then mess around with the generated nginx configurations to get it working?

Any thoughts? Thanks.

0 likes
4 replies
bashy's avatar
bashy
Best Answer
Level 65

You can deploy multiple sites on Forge and configure nginx as you wish. You can also pull in multiple repos for them.

At the end of the day, all it is is a VPS with a control panel over it.

1 like
marcusmoore's avatar

This is true. I was just wondering if I could manage all of that though the control panel. I just spun up a new droplet and actually looked at how it handled the nginx configurations per site. (I should've just done that to begin with)

Thanks for the help.

stefr's avatar

Hi Marcus, I was looking for the same sort of installation. Did you manage to do this? I want to use 3 repos on 3 subdomains (one repo per domain). I would like to know if it worked out for you.

bashy's avatar

Direct the repos to folders and then have a separate vhost (Nginx sever block) for each one of your sub domains.

Please or to participate in this conversation.