Connect Android Emulator to localhost with host headers

rlaskerrlasker Member ✭✭

I have a website hosted on the local machine that requires SSL and host headers. What is the most practical way to get an Android Emulator to connect to it?

Best Answer

  • rlaskerrlasker ✭✭
    Accepted Answer

    So, I was able to configure my site to not use host headers and respond on the localhost with a dev cert. This gets around my host header problem. Now to figure out how to get past my SSL trust issue. At least it is a step in the right direction.

Answers

  • rlaskerrlasker Member ✭✭

    so far I tried updating the hosts file as described here:
    https://medium.com/@crysfel/updating-the-hosts-file-on-android-emulator-d61a533a76cf

    and added host entries for :
    127.0.0.1 my.host.header
    and
    10.0.2.2 my.host.header

    but in both cases I get a connection refused error. I'm not even real sure how to debug this at this point.

  • rlaskerrlasker Member ✭✭
    Accepted Answer

    So, I was able to configure my site to not use host headers and respond on the localhost with a dev cert. This gets around my host header problem. Now to figure out how to get past my SSL trust issue. At least it is a step in the right direction.

Sign In or Register to comment.