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

vipin93's avatar
Level 13

Can someone explain how can I deploy more than two app LEMP server?

I tried to deploy two app one main app and other is demo app now i successfully deploy and made server block site enable "demo_dms" but problem when i restart my nginx server its giving errors

nginx: [alert] mmap(MAP_ANON|MAP_SHARED, 134217728) failed (12: Cannot allocate memory)
nginx: configuration file /etc/nginx/nginx.conf test failed 

I'm using amazon lightsail 5$ plan thanks

0 likes
8 replies
fideloper's avatar

I'm using amazon lightsail 5$ plan thanks

That, unfortunately, may be the issue - it seems that you're out of available RAM.

That being said, you may also have a bad Nginx configuration - run sudo nginx -t or check the /var/log/nginx/error.log to see more details on what it says.

jlrdw's avatar

Yes buy another plan for that customer, isn't customer paying for plan anyway?

vipin93's avatar
Level 13

no i'm using for my startup and now i don't have any customer so i thought first go for 5$ plan and after if i got customer then i'll migrate for bigger plan(money problem), i have question is that its fine to deploy two app one for demo and one main app? thanks

jlrdw's avatar

A couple is fine, but like @fideloper said, ram can be an issue.

You should be alright once you get a paying customer, meanwhile use your plan for testing.

For test you could probably have more, but only use one or two at most at a time.

vipin93's avatar
Level 13

i restart my server and everything looks fine but when i try to visit demo.mysite.com its not showing page and errors "demo.mysite.com server dns address could not be found DNS_PROBE_FINSIHED_NXDOMAIN"

vipin93's avatar
Level 13

@fideloper

you may also have a bad Nginx configuration

what is the best Nginx configuration for multiple app , any reference thanks

fideloper's avatar

I meant there may have been an error (syntax error usually) in the configuration. The command sudo nginx -t will show you if there is.

There isn't really a best Nginx configuration to help with this particular issue.

Please or to participate in this conversation.