Comments on: How to use Apache Virtual Hosts over a local network with MAMP http://www.aschroder.com/2009/04/how-to-use-apache-virtual-hosts-over-a-local-network-with-mamp/ Notes on Web Development Wed, 23 Dec 2020 09:25:05 +0000 hourly 1 https://wordpress.org/?v=4.8.15 By: Lisa http://www.aschroder.com/2009/04/how-to-use-apache-virtual-hosts-over-a-local-network-with-mamp/comment-page-1/#comment-4946 Tue, 14 Aug 2012 19:12:34 +0000 http://www.aschroder.com/?p=324#comment-4946 Hi,
I have a question about the localhost IP and domain name.

Firstly I registered one domain name called vietyoung.org
Secondly, my Internet service provider gave me one static IP address. 123.45.67.89
Thirdly, I gave this IP address to my domain registry company and they points my domain name to this IP address.

Fourly, I installed Apache web server in my personal computer
and I tested this Apache web server installation successfully with the testing page when I type http://localhost/index.htm
However, when I typed in my domain name http://www.vietyoung.org, I got the issue about the page is not found or there is no internet connection.

I checked that my index page is in the right document root folder as shown in localhost.
I checked that my internet connection is fine because I can view yahoo web page.

I try to configure the host file and virtual host file to set my static IP address and domain name. But I cannot view my site under http://www.vietyoung.org

Can you tell me difference between the IP address of my computer or IP address of internet service provider?
Which IP address can be used?

]]>
By: Ashley http://www.aschroder.com/2009/04/how-to-use-apache-virtual-hosts-over-a-local-network-with-mamp/comment-page-1/#comment-2476 Tue, 26 Jul 2011 09:55:57 +0000 http://www.aschroder.com/?p=324#comment-2476 Check if you can access the VM on port 80 by runnign this in a terminal:
telnet 192.168.1.111 80

If that does not connect, then I’d check for firewalls on CentOS, check Apache is listening on the right interface not just localhost.

If you _can_ connect, then I’d try and look for errors in Apache logs. Try access just the default ‘It Works’ page etc.

]]>
By: dcolumbus http://www.aschroder.com/2009/04/how-to-use-apache-virtual-hosts-over-a-local-network-with-mamp/comment-page-1/#comment-2468 Sun, 24 Jul 2011 04:45:29 +0000 http://www.aschroder.com/?p=324#comment-2468 Hey Ashley,

Thanks for the post … curious if you’d be able to help me.

I’ve created a VM of CentOS on my MacBook Pro with the ethernet set to Bridged. So, the VM has it’s own static IP address of 192.168.1.111

Within the “hosts” file on the VM, I’ve got:

127.0.0.1 dev.example.com

Within the “hosts” file on my MacBook Pro (the host machine), I’ve got:

192.168.1.111 dev.example.com

Now the site works fine from within the VM, but doesn’t pull up anything from the host MacBook Pro…

I’ve spent literally 2 days trying to setup this stupid network and I have no idea what the issue is! :X

]]>
By: Ashley http://www.aschroder.com/2009/04/how-to-use-apache-virtual-hosts-over-a-local-network-with-mamp/comment-page-1/#comment-2146 Sun, 13 Feb 2011 17:51:02 +0000 http://www.aschroder.com/?p=324#comment-2146 Hi, Eric
Not sure if it’s a copy paste issue, but your other box hosts file has:
192.168.1.156 jennylynne.net

That needs to match the ServerName in the Apache config, which is .dev. let me know if that was the issue.

]]>
By: Eric Ritchey http://www.aschroder.com/2009/04/how-to-use-apache-virtual-hosts-over-a-local-network-with-mamp/comment-page-1/#comment-2144 Sun, 13 Feb 2011 03:32:53 +0000 http://www.aschroder.com/?p=324#comment-2144 Hey Ashley –

Thanks for the writeup.. I’m in the middle of trying to accomplish exactly this.

Here’s my setup:
MBP + MAMP + VirtualHost = My development environment

I want to view the websites I’m currently developing from anywhere on my local network (exactly what this article lays out), but I’m having some trouble here… :-/

This is my vhost file on my development box:

# Created Wed Feb 9 23:13:24 PST 2011
<VirtualHost 127.0.0.1:80>
DocumentRoot /Applications/MAMP/htdocs/jennylynne
ServerName jennylynne.dev

ScriptAlias /cgi-bin /Applications/MAMP/htdocs/jennylynne/cgi-bin

<Directory /Applications/MAMP/htdocs/jennylynne>
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


Here’s my /etc/hosts file from my development box:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##

127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

127.0.0.1 jennylynne.dev

Here’s my /etc/hosts file from the computer on the same local network:

192.168.1.156 jennylynne.net

The problem is that I simply get a directory listing of my /Applications/MAMP/htdocs folder when loading up http://jennylynne.dev on my “local network” computer, whereas when i go to the same URL on my dev box, the site loads up fine. any thoughts?

P.S. – I’ve verified the IP address also..

]]>
By: Ashley http://www.aschroder.com/2009/04/how-to-use-apache-virtual-hosts-over-a-local-network-with-mamp/comment-page-1/#comment-697 Wed, 11 Nov 2009 10:47:21 +0000 http://www.aschroder.com/?p=324#comment-697 Hi, You can.
I think this post on using Magento, MAMP and virtual hosts over a network is what you need? Is that what you were trying to do?

]]>
By: Dave Stewart http://www.aschroder.com/2009/04/how-to-use-apache-virtual-hosts-over-a-local-network-with-mamp/comment-page-1/#comment-693 Fri, 06 Nov 2009 15:23:40 +0000 http://www.aschroder.com/?p=324#comment-693 Interesting post!

What would I do to connect to a folder on the remote machine, where my virtual host is set up? Can I do that?

Thanks

]]>