How to force to load local content instead of remote?

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

How to force to load local content instead of remote?

Postby sergiozambrano » 04. April 2010 08:19

Hi, I'm a copy/paste developer, so far, and believe it or not, I've managed to create nice wordpress websites.
So now I'm one year later, using MAMP or XAMPP to have them all (like 8 of them) on my local, or at least the new ones, so I'm experimenting with this and it's very interesting.

I've managed to setup two different websites locally, so when I use them without www, it takes the virtual domain saved in my httpd.conf and my hosts. I expected when I use www to be taken to the remote site.

httpd.conf has

Code: Select all
NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
    ServerAdmin sergio@sergiozambrano.com
    DocumentRoot "/Users/sergio/Sites"
    ServerName Sites
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin sergio@mysite1.info
    DocumentRoot "/Volumes/Trabajos/mysite1/site"
    ServerName mysite1.info
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin sergio@mysite2.com
    DocumentRoot "/Volumes/Trabajos/mysite2/website"
    ServerName mysite2.com
</VirtualHost>



and hosts is
Code: Select all
127.0.0.1   mysite1.info
127.0.0.1   mysite2.com

The problem is, when I let the ethernet cable plugged in, the website is read from the web.

Is there any way to force the content to be loaded from the local ip?

Thanks.
sergiozambrano
 
Posts: 5
Joined: 04. April 2010 08:17

Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 2 guests