0

This question has been brought up once before, but the suggested solution doesn't work for me?

I've read through the following article (you can see my comments back and forth with the author): https://blogs.adobe.com/shadow/2012/06/19/shadow-xip-io-virtual-hosts-workflow-simplified/ but none of the suggestions have worked.

To re-cap:

  • I have the following ‘test’ host created in MAMP Pro:
    mamp screenshot
  • I've turned off Web Sharing
  • I’ve added ServerAlias client.*.xip.io to MAMP Pro
  • I’ve updated the httpd.conf file (within /private/etc/apache2) so the virtual hosts line (Include /private/etc/apache2/extra/httpd-vhosts.conf) is un-commented
  • I’ve updated the httpd-vhosts.conf file (within /private/etc/apache2/extra) with the following content…

.

<VirtualHost>
    DocumentRoot "/path/to/files"
    ServerName test
    ServerAlias test.*.xip.io
</VirtualHost>

...but when I try to access the files via http://test.192.168.0.40.xip.io/ I get the 'Unable to connect' error?

Really can't understand why I can't get this working.

brasofilo
  • 25,496
  • 15
  • 91
  • 179
Integralist
  • 2,161
  • 1
  • 32
  • 50

3 Answers3

1

Your configuration in the MAMP pro screenshot has the alias setting as client.*.xip.io while the URL you're using to try to access it is test.192.168.0.40.xip.io.

If you switch the Server Alias configuration in the MAMP Pro GUI to test.*.xip.io, does it work?

I don't believe that the other steps you used for configuring the vhosts manually via the /private/etc/apache2/* files will be picked up by MAMP, as MAMP httpd.conf and httpd-vhosts.conf files are in a different location.

/Applications/MAMP/conf/apache/httpd.conf and /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf I think? Since you've got MAMP Pro and configured via the GUI though, these should already reflect your changes.

1

If you are using MAMP Pro 2.x (there seems no need to configure hosts file, since it is enabled by MAMP itself) you can may only need to add the Adobe Shadow friendly URL to the Aliases section of the MAMP host setup:

Server Name: mobile.dev/ #my regular mamp server URL for the site 'mobile'

Aliases: mobile.--MY-IP-Address--.xip.io #Adobe Shadow friendly URL

then all I enter the alias URL into the Chrome browser window is the alias URL and it display in Showdow on my mobile phone.

NOTE: I am using a static IP address with DHCP for development. In MAMP Pro 2.x you cannot enter a * character into the Aliases fields!

UPDATE: you may also only enter the following into the

'Customized virtual host general setting' area under the Advanced tab:

ServerAlias mobile.*.xip.io

and then load the URL with your IP address:

mobile.xx.xx.xx.xx.xip.io/ in Chrome

el_reverend
  • 374
  • 2
  • 11
  • I'm using version 2.0.1 but I don't want to use Adobe Shadow, I just want to use xip.io (I know that article uses both but I'm not interested in using Shadow - for the moment any way). – Integralist Jul 19 '12 at 12:15
  • I changed the MAMP setting to ServerAlias test..xip.io* and tried accessing http://test.192.168.0.40.xip.io/ but that didn't work - still "Problem loading page"? – Integralist Jul 19 '12 at 12:15
  • @Integralist I think for the XIP.io to work you need to set your 'Customized Virtual Host Setting' on the Advanced tab to 'ServerAlias test.*.xip.io'. The 'normal' server alias does not evaluate wildcards fro some reason. – el_reverend Jul 31 '12 at 16:00
  • what version of MAMP Pro are you using? I have only tried this with v2.x, but this should be possible with that v as well. – el_reverend Aug 08 '12 at 19:58
  • sorry for late reply - been on a Honeymoon - I'm using MAMP Pro 2.0.5 – Integralist Aug 25 '12 at 11:09
  • Just adding the Alias in MAMP Pro 2.0.5 works fine for me in OS X 10.7.4. – brasofilo Sep 12 '12 at 15:26
  • Was this problem ever solved? I'm having the exact same issue trying to connect through my android device. – norsewulf Sep 12 '13 at 17:06
  • I am using it all the time on different versions of MAMP / MAMP Pro and other packaged LAMP software. Mamp Pro however is still the easiest to configure. Depending on what device you are using you can use the ServerAlias address of your _local_ network or use tool like Adobe Edge Inspect (while this still requires a lan - it will let you open a dev console on the window itself. NOTE: in Edge inspect you cannot use the original hostname on your origin browser - it will fail on the attached devices! Use the xip.io address with your local ip instead.) – el_reverend Nov 05 '13 at 18:38
1

This answer is a bit late I know, but just came across it while looking for something else. I've had no problem getting this working on my machine, so I thought I'd just chime in...

By default the MAMP serves your sites on port 8888 - have you tried accessing your site using http://test.192.168.0.40.xip.io:8888/?

Emyr Thomas
  • 251
  • 1
  • 3