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


((Fu Nix It) Nguyen Ba Ngoc) #1

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


(Nathaniel Mattocks) #2

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


((Fu Nix It) Nguyen Ba Ngoc) #3

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


(Nathaniel Mattocks) #4

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


((Fu Nix It) Nguyen Ba Ngoc) #5

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.


((Fu Nix It) Nguyen Ba Ngoc) #6

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


(Nathaniel Mattocks) #7

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


#8

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


((Fu Nix It) Nguyen Ba Ngoc) #9

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


((Fu Nix It) Nguyen Ba Ngoc) #10

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


(Régis Hanol) #11