9 Replies Latest reply on Apr 22, 2013 3:00 PM by jrh217

    named host support?

    jrh217

      First - I love this product. It's really making mobile development easier. Good job guys!

       

      I seem to have a problem getting named hosts to work with Adobe Edge Inspect. I'm a developer with several projects running locally on my machine with hosts set up for each one (i.e., project.local, anotherproject.local). Apache's running using named based virtual hosting to serve the files. The problem is it only ever serves the first, or default, host configuration. Perhaps I'm doing something wrong?

       

      As a workaround I've been moving the site I want to inspect into the default spot in the hosts file, and it seems to work great. It would be nice if I didn't have to finagle with my vhosts conf file each time I want to inspect :)

       

      Jeremy

        • 1. Re: named host support?
          Mark_Rausch Adobe Employee

          Thanks for the kudos

           

          Edge Inspect can't directly make use of named hosts because the devices aren't able to read the hosts file from your computer. We've coded the clients to understand "localhost", "127.0.0.1", and "<machinename>.local" addresses and replace them with the IP address we're talking to, but can't do much more than that.

           

          However, there is a workaround for using named hosts, described in this blog post: http://blogs.adobe.com/edgeinspect/2012/06/19/shadow-xip-io-virtual-hosts-workflow-simplif ied/

           

          Hope this helps,

          Mark

          • 2. Re: named host support?
            jrh217 Level 1

            Ah, makes sense. Thanks for the workaround, that'll be great!

            • 3. Re: named host support?
              var3121

              Hello Jeremy,

               

              I cant even achieve what you initially stated - getting inspect to show an apache serverd local site via IP, 127, localhost or machinename.local.

              They show up in the browser, but inspect just ignores it. Ie keeps displaying whatever page it displayed last.

               

              Can you elaborate on how you got it to see the first site in your hosts file?

              thanks,

              alvar

              • 4. Re: named host support?
                Mark_Rausch Adobe Employee

                Hi alvar,

                 

                Make sure that your site is available outside your machine. Try navigating to the page in the native browser on the device using the IP address of your computer. If the native browser can't reach it, either your site isn't online or there is an Apache security setting you need to change.

                 

                Mark

                • 5. Re: named host support?
                  jrh217 Level 1

                  Hi Alvar,

                   

                  I actually can't get inspect to work either, I've only ever been able to get the browser working. I had to stop fiddling with it because it was too time consuming, which is sad because I really like this idea. It's still useful for browsing. I'll pick up trying to figure it out again later.

                  • 6. Re: named host support?
                    Mark_Rausch Adobe Employee

                    Named hosts do work with Edge Inspect following the steps described in Matt's blog post linked above, I've done it myself. If you have specific questions we're happy to help out.

                     

                    Mark

                    • 7. Re: named host support?
                      jrh217 Level 1

                      I don't doubt it does! I couldn't get it working in my situation since the workaround doesn't work for me in my case. I'm dealing with a WordPress multisite which is entirely more difficult to work with than regular sites due to the way it parses the domain to get the site in which to use. When I get some time I'm going to write out my specific problem in great detail for you to check out :)

                      • 8. Re: named host support?
                        Mark_Rausch Adobe Employee

                        Ok, cool One possible reason for at least some of your problems is that by default Wordpress refers to linked assets with absolute URLs (that contain the full path) rather than with relative URLs. Often the device is unable to read those absolute URLs because we can't do the same substitution with the IP address that we do with the page URLs sent from Chrome.

                         

                        There is a fix for that issue here: http://wordpress.org/extend/plugins/root-relative-urls/

                         

                        Mark

                        • 9. Re: named host support?
                          jrh217 Level 1

                          Yes that is definitely part of the problem. A while ago I wrote a shell script to "move" the database between domains (i.e., between environments) which solves that issue without the need of a plugin, which may or may not exist between environments.