My internal network can't see my site?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

My internal network can't see my site?

Postby tomnuff » 06. September 2006 14:40

Hello,
I recently set up xampp and was successfull in getting the outside world to see my site. www.blueprintfs.com

However, I'm not able to pull up this site on my internal network. The only machine where it comes up is on the server that hosts the site.

What is preventing me from seeing the site internally?
User avatar
tomnuff
 
Posts: 19
Joined: 29. August 2006 17:45

Postby Izzy » 07. September 2006 00:20

Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

vhost

Postby tomnuff » 11. September 2006 17:19

I got my site to come up internally, thank you very much.

That link was ver helpfull, My question is do you need to include multiple
NameVirtualHost entries for each IP? The reason I ask is because I have multiple sites, each on on thier own external IP.

So the only NameVirtualHost entry I have is for my blueprintfs.com site

NameVirtualHost 70.253.151.134:80

do I need to include entries for each site? I ask because I didn't see this on the link.

Thanks.
User avatar
tomnuff
 
Posts: 19
Joined: 29. August 2006 17:45

Re: vhost

Postby Izzy » 11. September 2006 22:22

tomnuff wrote:I got my site to come up internally, thank you very much.

That link was ver helpfull, My question is do you need to include multiple
NameVirtualHost entries for each IP? The reason I ask is because I have multiple sites, each on on thier own external IP.

So the only NameVirtualHost entry I have is for my blueprintfs.com site

NameVirtualHost 70.253.151.134:80

do I need to include entries for each site? I ask because I didn't see this on the link.

Thanks.

Yes if you have different IPs that have thier own web sites:
http://httpd.apache.org/docs/2.2/vhosts ... es.html#ip

Or mix namebased and IP based:
http://httpd.apache.org/docs/2.2/vhosts ... tml#ipport

Or multiple sites with the same IP (everybody's favourite if they have a dynamic IP):
http://httpd.apache.org/docs/2.2/vhosts ... l#purename

Just about every scenario of virtual hosting you can imagine is included in the Example page:
http://httpd.apache.org/docs/2.2/vhosts/examples.html

Looks like you are progressing well. :)
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby tomnuff » 12. September 2006 15:02

Thanks for all you help, but I'm stuck again. Even with your examples, I can pull up my website internally and externally but all my other websites all pull up my blueprintfs.com site? I have two other websites, asset-estateprotectors.com and mammarketing.com . You can probably even try it yourself if you type in these names. Below is my code.

I changed my document root from
Code: Select all
DocumentRoot "D:/xampp/xampp/htdocs/BFS"

to
Code: Select all
DocumentRoot "D:/xampp/xampp/htdocs"


It didnt help with changing how it resolves.

I also did this in my vhost file to see if resolves correctly, it did not.
Code: Select all
# 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.
#
NameVirtualHost 70.X.X.138:80
NameVirtualHost 70.X.X.134:80
NameVirtualHost 70.X.X.133:80
NameVirtualHost 70.X.X.139:80
NameVirtualHost 192.168.0.11

##<VirtualHost 70.X.X.134:80>
##ServerName localhost
##DocumentRoot "D:/xampp/xampp/htdocs/BFS"
##ServerAdmin you@yourdomain.com
##</VirtualHost>


<VirtualHost 70.X.X.134:80>
ServerName blueprintfs.com
ServerAlias www.blueprintfs.com
DocumentRoot "D:/xampp/xampp/htdocs/BFS"
ServerAdmin webmaster@blueprintfs.com
<Directory "D:/xampp/xampp/htdocs/BFS">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog @rel_logfiledir@/blueprintfs.com-error_log
CustomLog @rel_logfiledir@/blueprintfs.com-access_log common
</VirtualHost>

<VirtualHost 70.X.X.138:80>
ServerName asset-estateprotectors.com
ServerAlias www.asset-estateprotectors.com
DocumentRoot "D:/xampp/xampp/htdocs/hall"
<Directory "D:/xampp/xampp/htdocs/hall">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin webmaster@mammarketing.com
ErrorLog @rel_logfiledir@/asset-estateprotectors.com-error_log
CustomLog @rel_logfiledir@/asset-estateprotectors.com-access_log common
</VirtualHost>

<VirtualHost 70.X.X.133:80>
ServerName mammarketing.com
ServerAlias www.mammarketing.com
DocumentRoot "D:/xampp/xampp/htdocs/MAM"
<Directory "D:/xampp/xampp/htdocs/MAM">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin webmaster@mammarketing.com
ErrorLog @rel_logfiledir@/mammarketing.com-error_log
CustomLog @rel_logfiledir@/mammarketing.com-access_log common
</VirtualHost>


I even tried this in my conf file.
Code: Select all
 Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 70.X.X.138:80
Listen 70.X.X.139:80
Listen 70.X.X.134:80
Listen 70.X.X.133:80



I read the examples and I'm just not getting it.
I know this could either be something really small or something really big.

-Tom
User avatar
tomnuff
 
Posts: 19
Joined: 29. August 2006 17:45

Postby Izzy » 19. September 2006 14:27

I even tried this in my conf file.

Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 70.X.X.138:80
Listen 70.X.X.139:80
Listen 70.X.X.134:80
Listen 70.X.X.133:80

You can remove all the Listen entries in the httpd.conf file and replace with Listen 80 so the server will listen on all IPs on port 80. This is so that if you accidentally miss an IP then it will not matter.

--------------------

I changed my document root from
DocumentRoot "D:/xampp/xampp/htdocs/BFS"

to
DocumentRoot "D:/xampp/xampp/htdocs"

Your change to the DocumentRoot is correct.

--------------------

I also did this in my vhost file to see if resolves correctly, it did not.

# 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.
#
NameVirtualHost 70.X.X.138:80
NameVirtualHost 70.X.X.134:80
NameVirtualHost 70.X.X.133:80
NameVirtualHost 70.X.X.139:80
NameVirtualHost 192.168.0.11

##<VirtualHost 70.X.X.134:80>
##ServerName localhost
##DocumentRoot "D:/xampp/xampp/htdocs/BFS"
##ServerAdmin you@yourdomain.com
##</VirtualHost>


<VirtualHost 70.X.X.134:80>
ServerName blueprintfs.com
ServerAlias www.blueprintfs.com
DocumentRoot "D:/xampp/xampp/htdocs/BFS"
ServerAdmin webmaster@blueprintfs.com
<Directory "D:/xampp/xampp/htdocs/BFS">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog @rel_logfiledir@/blueprintfs.com-error_log
CustomLog @rel_logfiledir@/blueprintfs.com-access_log common
</VirtualHost>

<VirtualHost 70.X.X.138:80>
ServerName asset-estateprotectors.com
ServerAlias www.asset-estateprotectors.com
DocumentRoot "D:/xampp/xampp/htdocs/hall"
<Directory "D:/xampp/xampp/htdocs/hall">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin webmaster@mammarketing.com
ErrorLog @rel_logfiledir@/asset-estateprotectors.com-error_log
CustomLog @rel_logfiledir@/asset-estateprotectors.com-access_log common
</VirtualHost>

<VirtualHost 70.X.X.133:80>
ServerName mammarketing.com
ServerAlias www.mammarketing.com
DocumentRoot "D:/xampp/xampp/htdocs/MAM"
<Directory "D:/xampp/xampp/htdocs/MAM">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin webmaster@mammarketing.com
ErrorLog @rel_logfiledir@/mammarketing.com-error_log
CustomLog @rel_logfiledir@/mammarketing.com-access_log common
</VirtualHost>


This will give errors and as such will only allow the first default virtual host of blueprintfs.com to be served and no Internal network connections served.

Hopefully. here is a corrected httpd-vhosts.conf that should fix your issues. All you need do is compare the two to see the changes made.

Also I have removed the NameVirtualHost 70.X.X.139:80 that does not have a <VirtualHost> container.

I have also removed the port number :80 that each container Listens on because we have defined that in the httpd.conf file and we are not overriding that behaviour in the httpd-vhosts.conf file.

The localhost container needed changes to make it reflect the localhost 127.0.0.1 also known as the local loop back address.

I renamed the error log entries so you can easily find each domain's log files for analysis.
These new names can be even more condensed if required.
For example:
bfsaccess.log - bfserror.log
hallaccess.log - hallerror.log
mamaccess.log - mamerror.log

all with the path logs/ prefix of course.
For example:
ErrorLog logs/bfserror.log
CustomLog logs/bfsaccess.log common



You can even change the location of those log files if required.

For example, I created a directory in the server root called domlogs to contain all my domain's logs and keep them apart from the default server's logs contained in the xampp/apache/logs directory.

For example using the first domain in your list:
ErrorLog domlogs/bfserror.log
CustomLog domlogs/bfsaccess.log common


This approach makes log file analysis by speciality log file software much easier to configure and understand, plus it is much easier to find errors or access details for individual domains that you, the server admin, might require from time to time.

I also put things in numerical (IP number) order.
Code: Select all
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "D:/xampp/xampp/htdocs"
</VirtualHost>

NameVirtualHost 192.168.0.11
NameVirtualHost 70.X.X.134
NameVirtualHost 70.X.X.138
NameVirtualHost 70.X.X.133

<VirtualHost 192.168.0.11 70.X.X.134>
ServerName blueprintfs.com
ServerAlias www.blueprintfs.com
DocumentRoot "D:/xampp/xampp/htdocs/BFS"
ServerAdmin webmaster@blueprintfs.com
<Directory "D:/xampp/xampp/htdocs/BFS">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/blueprintfs.com-error.log
CustomLog logs/blueprintfs.com-access.log common
</VirtualHost>

<VirtualHost 192.168.0.11 70.X.X.138>
ServerName asset-estateprotectors.com
ServerAlias www.asset-estateprotectors.com
DocumentRoot "D:/xampp/xampp/htdocs/hall"
<Directory "D:/xampp/xampp/htdocs/hall">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin webmaster@mammarketing.com
ErrorLog logs/asset-estateprotectors.com-error.log
CustomLog logs/asset-estateprotectors.com-access.log common
</VirtualHost>

<VirtualHost 192.168.0.11 70.X.X.133>
ServerName mammarketing.com
ServerAlias www.mammarketing.com
DocumentRoot "D:/xampp/xampp/htdocs/MAM"
<Directory "D:/xampp/xampp/htdocs/MAM">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin webmaster@mammarketing.com
ErrorLog logs/mammarketing.com-error.log
CustomLog logs/mammarketing.com-access.log common
</VirtualHost>


Now when you issue the apache - S command in the xampp/apache/bin directory you should see something like this (I have separated the entries with a blank line for clarity and ease of reading):
Code: Select all
D:\xampp\xampp\apache\bin>apache -S

VirtualHost configuration:

192.168.0.11:80 is a NameVirtualHost
default server blueprintfs.com (D:/xampp/xampp/apache/conf/extra/httpd-
vhosts.conf:67)

port 80 namevhost blueprintfs.com (D:/xampp/xampp/apache/conf/extra/htt
pd-vhosts.conf:67)

port 80 namevhost asset-estateprotectors.com (D:/xampp/xampp/apache/con
f/extra/httpd-vhosts.conf:82)

port 80 namevhost mammarketing.com (D:/xampp/xampp/apache/conf/extra/ht
tpd-vhosts.conf:97)

127.0.0.1:80 localhost (D:/xampp/xampp/apache/conf/extra/httpd-vhosts.
conf:56)

70.X.X.138:80 is a NameVirtualHost
default server asset-estateprotectors.com (D:/xampp/xampp/apache/conf/e
xtra/httpd-vhosts.conf:82)

port 80 namevhost asset-estateprotectors.com (D:/xampp/xampp/apache/con
f/extra/httpd-vhosts.conf:82)

70.X.X.133:80 is a NameVirtualHost
default server mammarketing.com (D:/xampp/xampp/apache/conf/extra/httpd
-vhosts.conf:97)

port 80 namevhost mammarketing.com (D:/xampp/xampp/apache/conf/extra/ht
tpd-vhosts.conf:97)

70.X.X.134:80 is a NameVirtualHost
default server blueprintfs.com (D:/xampp/xampp/apache/conf/extra/httpd-
vhosts.conf:67)

port 80 namevhost blueprintfs.com (D:/xampp/xampp/apache/conf/extra/htt
pd-vhosts.conf:67)

wildcard NameVirtualHosts and _default_ servers:
_default_:443 localhost (D:/xampp/xampp/apache/conf/extra/httpd-ssl.con
f:74)

Syntax OK


--------------------

Just to add, did you set up your C:\WINDOWS\system32\drivers\etc\Hosts file to reflect your Internal host IP 192.168.0.11?
127.0.0.1 localhost
192.168.0.11 blueprintfs.com
192.168.0.11 asset-estateprotectors.com
192.168.0.11 mammarketing.com



Edit:
This configuration must have had some effect as I can now see your 3 domains from the Internet.
I still have no way of knowing yet if the Internal addresses resolve successfully.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: Gharas and 65 guests