ghoshRitesh12 / aniwatch-api

Node.js API for obtaining anime information from hianime.to
https://aniwatch-api.onrender.com
MIT License
267 stars 162 forks source link

Can't open through vps #57

Closed Kisaramax closed 4 months ago

Kisaramax commented 4 months ago

I tried to use this in my vps(through docker) & when I go to that ip it says "This page isn’t working If the problem continues, contact the site owner. HTTP ERROR 400"

what should I do?

ghoshRitesh12 commented 4 months ago

can you provide a screenshot for better understanding of the issue?

Kisaramax commented 4 months ago

here this is the response from vps shows when i trying to access it's ip (ex: 167.xx.xxx.xxx:4000) Screenshot from 2024-07-13 15-14-10

this is how i started it on docker Screenshot from 2024-07-13 15-10-42

ghoshRitesh12 commented 4 months ago

Try to ping the local deployment using curl and see whether it's returning an error or not.

For example something like curl http://localhost:4000/anime/home

Kisaramax commented 4 months ago

it returns correct results but when I tried to do same thing on local machine using ip it returns nothing like lt is limited to localhost

ghoshRitesh12 commented 4 months ago

Maybe you are just hosting the api just locally i.e. using the loop back url. Try hosting it on the network.

WBRK-dev commented 4 months ago

Check in the firewall of the vps if the port 4000 is forwarded. Most likely only port 80/443 is forwarded.

Kisaramax commented 4 months ago

I found solution it is not happening due to firewall, anyway I used nginx reverse proxy to to expose it to internet & now it is working without any issue