Can't upload images when domain name is an IP address

Hi every one, Im newbie.

I set up the Discourse under the IP http://128.199.222.14/.

But when i upload image, the image url change to the picture below and it can not display?

Can all you guys can help me to fix that.

I sovled that: Change http://128.199.222.14/ to 128.199.222.14 in app.yml

1 Like

I will have a look on your site… I’m the user Nathanielmattock. :wink:

1 Like

Okay i will active you because i did not set up email sending yet.

Hmm… What service do you use to host your data?

I use digital ocean.

The URL you upload is
http://128.199.222.14//uploads/default/original/1X/9a7032754d4a24aa23222a5961753a0bed74ffb5.jpg

It’s work but in my site it’s converted to ‘//http://128.199.222.14//uploads/default/original/1X/9a7032754d4a24aa23222a5961753a0bed74ffb5.jpg’

I dont know why it added more two slashes before the origin URL.

I think i will rebuild again and set IP just is 128.199.222.14

1 Like

I might need the admin or at least moderator status to view some of the setup, unless someone that does support can…

I think it could be an error in the file app.yml

Line ~57 you should have

DISCOURSE_HOSTNAME: '128.199.222.14'

Nothing more

3 Likes

Okay it’s exactly. I finish fixed it.:smiley:

1 Like

I finished that. Thanks for your help.:smiley:

1 Like