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

kordix's avatar

Serve many Laravel apps (virtual hosts) on one VPS WITHOUT DOMAIN

I have laravel already working on one virtual host.

But can we serve many apps on one VPS WITHOUT buying the domain, using the ip?

Like http://ip/site1 http://ip/site2

To make it more obvious it can be:

http://ip/myaliasttest should lead to <Directory /var/www/html/site1/public> and http://ip/myaliasttest2 should lead to <Directory /var/www/html/site2/public>

there should be nothing available on http://ip

0 likes
2 replies
Nash's avatar

You can use one IP with multiple domains/subdomains or you can use multiple IP's (or different ports) and no domains but I don't think you can easily use one IP with multiple apps like you describe (without risk of exposing the application directories). Hover.com has domains for as low as $4.99/year so it's not a huge investment. For local development, you can point non-existing domains (e.g. myapp.test) to your IP.

See this article: https://www.tecmint.com/apache-ip-based-and-name-based-virtual-hosting/

1 like
kordix's avatar

I'm going to buy the domain, big thanks for answer

Please or to participate in this conversation.