johanmodin/clifs

Public URL instead of localhost

srikar2097 opened this issue · 3 comments

Hey Johan @johanmodin ,
Great work with CLIFS! I am able to set it up as shown in the readme and search from localhost (127.0.0.1). How should I go about if I want to host this with a public URL (I will of course cite and reference your work.)

L16 in entrypoint.sh does say 0.0.0.0 but somehow it does not serve the hosts public url (I am using EC2).

thanks again and looking forward to hearing from you.

Hey,

Glad you like it!

I want to preface this by saying that this project is just meant to be a proof-of-concept to show what is possible to do, so there are e.g., non-production mode switches that are on. Please make sure that you're okay with the configuration ahead of making it publicly accessible. That said, you probably need to set django's ALLOWED_HOSTS option to something that is akin to the server's name. This should be done in www/clifs/settings.py.

@johanmodin ,

I tried the following:

DEBUG = False
ALLOWED_HOSTS = ['.compute-1.amazonaws.com'] # hoping it allows viewing of instances directly

when I try to access the search interface via http://<my_ec2_insance>.compute-1.amazonaws.com:8000, it errors out unable to access. I am not that well versed with Django, am I missing something else? Thanks again for helping me!

Have you set up publicly facing docker containers on AWS before? I don't think you should have to do anything else in Django or docker to at least get the server up and accepting connections, which makes me think it is probably an AWS thing. Is port 8000 open on your instance?