xampp for windows DNS problem

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

xampp for windows DNS problem

Postby garyww » 16. March 2009 15:49

i have this on my httpd-vhosts

<VirtualHost *:80>
ServerAdmin webmaster@adex-hk.com
DocumentRoot "C:/Program Files/xampp/htdocs/Public/myweb/"
ServerName localhost
ServerAlias http://www.adex-hk.com
## ErrorLog @rel_logfiledir@/adex-hk.com-error_log
## CustomLog @rel_logfiledir@/adex-hk.com-access_log common
</VirtualHost>



<VirtualHost *:80>
ServerAdmin webmaster@site1.com
DocumentRoot "C:/Program Files/xampp/htdocs/Public/myweb/site1/"
ServerName site1.loc
## ErrorLog @rel_logfiledir@/site1.com-error_log
## CustomLog @rel_logfiledir@/site1.com-access_log common
</VirtualHost>

I also have this
127.0.0.1 localhost
127.0.0.1 site1.loc

How can i set the xampp and the windows 2003 server of DNS properly in order
for the domain let say easternpearlonline.com able to point to site1.loc with the attached image of
windows DNS setting and name server setting and www setting and mail setting

http://www.qgame.org/mxp1.jpg
http://www.qgame.org/mxp2.jpg
http://www.qgame.org/ns1.jpg
garyww
 
Posts: 35
Joined: 16. February 2009 15:38

Re: xampp for windows DNS problem

Postby Izzy » 17. March 2009 00:52

First your NameServer edits at GoDaddy gives errors were detected usually because they could not find an IP related to your nameservers also you don't have a zone file setup for your domain name - this is not a part of XAMPP but there are free DNS NameServer Zone File services on the Internet of which ZoneEdit is a good reliable choice - obviously dnsmgmt you have setup is not recognised by GoDaddy, your domain name and nameserver registrar, so best not to use it but use an Internet based DNS Zone File service provider.

You can use the free for 5 domains https://www.zoneedit.com service for this purpose after registering and configuring your domain name, then add the nameservers to your GoDaddy account that ZoneEdit gives you, which will point your domain to your server IP on the PC that XAMPP is installed on - there will be a short delay after changing your nameservers at GoDaddy with the nameservers provided by ZoneEdit for this information to propagate the Internet but with a dot com address may well be not more that a few minutes perhaps.



Your other issue is with your httpd-vhost.conf file.

Try this after you have setup your domain name at ZoneEdit and edited your GoDaddy nameservers.
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/Program Files/xampp/htdocs"
</VirtualHost>

<VirtualHost *:80>
ServerName adex-hk.com
ServerAlias www.adex-hk.com
ServerAdmin webmaster@adex-hk.com
DocumentRoot "C:/Program Files/xampp/htdocs/Public/myweb/"
ErrorLog logs/adex-hk.com-error.log
CustomLog logs/adex-hk.com-access.log common
LogLevel error
</VirtualHost>

<VirtualHost *:80>
ServerName site1.loc
ServerAlias www.site1.loc
ServerAdmin webmaster@site1.com
DocumentRoot "C:/Program Files/xampp/htdocs/Public/myweb/site1/"
ErrorLog logs/site1.com-error.log
CustomLog logs/site1.com-access.log common
LogLevel error
</VirtualHost>
This will allow:
http://localhost <--the XAMPP Welcome Page

http://adex-hk.com <-- the web site in the myweb folder
http://www.adex-hk.com

http://site1.loc <-- the web site in the myweb/site1 folder
http://www.site1.loc

Your Hosts file may look like this:
Code: Select all
127.0.0.1 localhost
127.0.0.1 adex-hk.com
127.0.0.1 site1.loc


BTW it is advisable not to install XAMPP to the folder Program Files as it has a space in the name which may cause you to have some related issues.

Best to install to the root of C:\ then the install will put the files in the C:\xampp folder for you, then run setup_xampp.bat file to set all the paths in XAMPP correctly - I prefer to install using the EXE (7zip) version for easy installation using the above method of extracting the files.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: xampp for windows DNS problem

Postby garyww » 18. March 2009 12:01

hi,
I was in hong kong not USA. Thereby, i was unable to use www.zoneedit.com
any recommendation as well.

thanks
gar
garyww
 
Posts: 35
Joined: 16. February 2009 15:38

Re: xampp for windows DNS problem

Postby Izzy » 18. March 2009 23:06

Google is your friend.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: xampp for windows DNS problem

Postby smallie9 » 20. March 2009 01:54

I have this problem, I can't get anyone to view my site and someone told me to change the settings in vhost this is what mine file looks like:

#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
##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 webmaster@dummy-host.example.com
## DocumentRoot /www/docs/dummy-host.example.com
## ServerName dummy-host.example.com
## ServerAlias www.dummy-host.example.com
## ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log
## CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common
##</VirtualHost>

##<VirtualHost *:80>
## ServerAdmin webmaster@dummy-host2.example.com
## DocumentRoot /www/docs/dummy-host2.example.com
## ServerName dummy-host2.example.com
## ErrorLog @rel_logfiledir@/dummy-host2.example.com-error_log
## CustomLog @rel_logfiledir@/dummy-host2.example.com-access_log common
##</VirtualHost>

I set up a DynDNS, it's sw6chat.servebbs.com am I suppose to put my ip or this adress in any other these lines? I can only view my site from my pc online, no other pcs. I want to make it public! :S

I'm using Windows Vista, ApacheFriends XAMPP version 1.7.0, no router, ports opened, firewall is set to allow access. Please help me
smallie9
 
Posts: 3
Joined: 19. March 2009 23:31

Re: xampp for windows DNS problem

Postby Nobbie » 20. March 2009 12:04

If you have a standard Xampp installation, you dont need to do anything - simply start Apache. Did you start Apache?

Can you show us the "LISTEN ..." command of your Apache Configuration?

I did a "ping" on sw6chat.servebbs.com and it tells me, that it is connected to 68.196.178.159 - that should be your WAN IP (the IP, which is set be your provider). Next i tried a PortScan on that IP and it tells me, that there or NO(!) open ports on that IP. That's the problem.
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: xampp for windows DNS problem

Postby Izzy » 20. March 2009 12:22

smallie9 wrote:I set up a DynDNS, it's sw6chat.servebbs.com am I suppose to put my ip or this adress in any other these lines? I can only view my site from my pc online, no other pcs. I want to make it public! :S

I'm using Windows Vista, ApacheFriends XAMPP version 1.7.0, no router, ports opened, firewall is set to allow access. Please help me
This is the same info you provided after I asked you to provide it in the topic you started here:
viewtopic.php?f=16&t=34163

Really there is no need to double post as you will only end up with the same answers no matter how many times you post the same questions.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: xampp for windows DNS problem

Postby m4v3n » 08. June 2010 07:35

Dear All,

I need your help also to solving my DNS problem. I build Web Server with application XAMPP and in the same PC i build DNS server (Windows DNS Server). Here is my detail hardware information:

OS: WIndows Server 2003 Enterprise Edition SP2
Processor: Intel Xeon (R) CPU
RAM: 4 GB
HDD: 120 GB

My XAMPP Application Detail information:

###### Apache Friends XAMPP (Basis Package) version 1.7.3 ######

+ Apache 2.2.14 (IPV6 enabled)
+ MySQL 5.1.41 (Community Server) with PBXT engine 1.0.09-rc
+ PHP 5.3.1 (PEAR, Mail_Mime, MDB2, Zend)
+ Perl 5.10.1 (Bundle::Apache2, Apache2::Request, Bundle::Apache::ASP, Bundle::Email, Bundle::DBD::mysql, DBD::SQlite, Randy Kobes PPM)
+ XAMPP Control Version 2.5.8 (ApacheFriends Edition)
+ XAMPP CLI Bundle 1.6
+ XAMPP Port Check 1.5
+ XAMPP Security 1.1
+ SQLite 2.8.17
+ SQLite 3.6.20
+ OpenSSL 0.9.8l
+ phpMyAdmin 3.2.4
+ ADOdb v5.10
+ FPDF v1.6
+ Zend Framework 1.9.6 Minimal Package (via PEAR)
+ Mercury Mail Transport System v4.72
+ msmtp 1.4.19 (a sendmail compatible SMTP client)
+ FileZilla FTP Server 0.9.33
+ Webalizer 2.21-02 (with GeoIP lite)
+ apc 3.1.3p1 for PHP
+ eAccelerator 0.9.6-rc1 for PHP
+ Ming 0.4.3 for PHP
+ PDF with pdflib lite v7.0.4p4 for PHP
+ rar 2.0.0-dev for PHP
+ Xdebug 2.0.6-dev for PHP
+ libapreq2 v2.12 (mod_apreq2) for Apache

I have setup more than 1 domains, and httpd-vhosts.conf already activated on apache configuration. But i only can open all domains on my localhost PC, but i cannot view all domains on other PCs. In other PCs anytime i try to open my domains it always linked to xampp's site. Example: I tried to open http://www.testingdomain.com/ --> when I click enter's button --> the browser linked to http://www.testingdomain.com/xampp/ --> and the page of xampp's site shown but not my domain's site.

Need your help soon. What i have to do now ? Thanks a lot.
m4v3n
 
Posts: 5
Joined: 08. June 2010 07:16

Re: xampp for windows DNS problem

Postby JonB » 08. June 2010 08:19

This has nothing to do with DNS.

XAMMP, by default, redirects the user to the XAMPP for Windows page. Until you creat a new 'landing page' in the root of each vhost (plus the default) and configure those pages to be the ones served by default, the XAMPP page wil be served.

Its an Apache directive. You'll find what's needed in \xampp\apache\conf\httpd.conf

Search for DirectoyIndex

This sets the default order pages will be served if a 'directory' is named rather than a 'page'. So "IF" you wanted index.html to be the page in the root of each vhost that will be served first (if it is present), you would promote (move to the first position in the list) index.html, putting it before index.php.

You can override this with other directives for specific directories (that's what 'alllow override' is for) or .htaccess files.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: xampp for windows DNS problem

Postby m4v3n » 08. June 2010 09:41

Dear JonB thanks for your explanation. But i think its not the right answer i need. What i need is how to open my sites (not xampp's sites) in other PCs after i configure 5 domains on my site with XAMPP and activating httpd-vhosts.conf. When i try to open my sites (example: on other PCs, i open browser and write it http://mysites.com) on other PCs, after i enter --> and the browser always served to http://mysites.com/xampp --> shown xampp's sites always and not my site's screen page.

how to fix it, so i could open my site from other PCs just by write http://mysite.com ??? that's what i need.

thanks a lot. I'm waiting for your quick response.
m4v3n
 
Posts: 5
Joined: 08. June 2010 07:16

Re: xampp for windows DNS problem

Postby Radzio » 08. June 2010 10:13

You must have misconfigured the virtualhosts.
See my very simple example:
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
   ServerName mypc
   DocumentRoot /Server/xampplite/htdocs
   
   <Directory /Server/xampplite/htdocs>
      AllowOverride All
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>

<VirtualHost *:80>
   ServerName starter.mypc
   DocumentRoot /Server/apps/starter/public
   
   <Directory /Server/apps/starter/public>
      AllowOverride All
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>

<VirtualHost *:80>
   ServerName another.mypc
   DocumentRoot /Server/apps/another/public
   
   <Directory /Server/apps/another/public>
      AllowOverride All
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>


And with this kind of configuration you should make DNS point mypc and *.mypc (with wildcard) to your server. It works for me in my LAN. (DNS server is on my router)
Radzio
 
Posts: 81
Joined: 05. June 2010 12:26

Re: xampp for windows DNS problem

Postby Nobbie » 08. June 2010 10:19

Show us your virtualhost configuration, show us ALL hosts files (server and clients hosts file).
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04

Re: xampp for windows DNS problem

Postby Radzio » 08. June 2010 10:22

Nobbie wrote:and clients hosts file

I think he's about using DNS rather than manually setting hosts file on each machine.
Radzio
 
Posts: 81
Joined: 05. June 2010 12:26

Re: xampp for windows DNS problem

Postby m4v3n » 08. June 2010 10:33

Dear Nobbie,
here is my detail httpd-vhosts.conf configuration:

#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost localhost: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 postmaster@dummy-host.localhost
##DocumentRoot "D:/xampp/htdocs/dummy-host.localhost"
##ServerName dummy-host.localhost
##ServerAlias www.dummy-host.localhost
##ErrorLog "logs/dummy-host.localhost-error.log"
##CustomLog "logs/dummy-host.localhost-access.log" combined
##</VirtualHost>

##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot "D:/xampp/htdocs/dummy-host2.localhost"
##ServerName dummy-host2.localhost
##ServerAlias www.dummy-host2.localhost
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>

<VirtualHost mysite1.co.id:80>
ServerAdmin test1@mysite1.co.id
DocumentRoot "D:/xampp/htdocs/vhosts/www.mysite1.co.id/"
ServerName mysite1.co.id
ServerAlias www.mysite1.co.id
ErrorLog "logs/mysite1.co.id.webserver-testi-error.log"
CustomLog "logs/mysite1.co.id.webserver-testi-access.log" combined
</VirtualHost>

<VirtualHost mysite2.co.id:80>
ServerAdmin test1@mysite1.co.id
DocumentRoot D:/xampp/htdocs/vhosts/www.mysite2.co.id/web/html
ServerName mysite2.co.id
ServerAlias www.mysite2.co.id
ErrorLog "logs/www.mysite2.co.id.webserver-testi-error.log"
CustomLog "logs/www.mysite2.co.id.webserver-testi-access.log" combined
</VirtualHost>

<VirtualHost mysite3.co.id:80>
ServerAdmin test1@mysite1.co.id
DocumentRoot D:/xampp/htdocs/vhosts/www.mysite3.co.id/v2
ServerName mysite3.co.id
ServerAlias mysite3.co.id
ErrorLog "logs/www.mysite3.co.id.webserver-testi-error.log"
CustomLog "logs/www.mysite3.co.id.webserver-testi-access.log" combined
</VirtualHost>

How to make my virtual hosts work well so i can access mysite1, mysite2, mysite3 from other PCs just by write http://mysite1.co.id, http://mysite2.co.id and http://mysite3.co.id ??

thanks for your attention and help bro...
m4v3n
 
Posts: 5
Joined: 08. June 2010 07:16

Re: xampp for windows DNS problem

Postby Radzio » 08. June 2010 10:58

Using <VirtualHost domainname:80> is not recommended. I think you don't need it either.
Try:
Code: Select all
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
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 postmaster@dummy-host.localhost
##DocumentRoot "D:/xampp/htdocs/dummy-host.localhost"
##ServerName dummy-host.localhost
##ServerAlias www.dummy-host.localhost
##ErrorLog "logs/dummy-host.localhost-error.log"
##CustomLog "logs/dummy-host.localhost-access.log" combined
##</VirtualHost>

##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot "D:/xampp/htdocs/dummy-host2.localhost"
##ServerName dummy-host2.localhost
##ServerAlias www.dummy-host2.localhost
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>

<VirtualHost *:80>
ServerAdmin test1@mysite1.co.id
DocumentRoot "D:/xampp/htdocs/vhosts/www.mysite1.co.id/"
ServerName mysite1.co.id
ServerAlias www.mysite1.co.id
ErrorLog "logs/mysite1.co.id.webserver-testi-error.log"
CustomLog "logs/mysite1.co.id.webserver-testi-access.log" combined
</VirtualHost>

<VirtualHost *:80>
ServerAdmin test1@mysite1.co.id
DocumentRoot D:/xampp/htdocs/vhosts/www.mysite2.co.id/web/html
ServerName mysite2.co.id
ServerAlias www.mysite2.co.id
ErrorLog "logs/www.mysite2.co.id.webserver-testi-error.log"
CustomLog "logs/www.mysite2.co.id.webserver-testi-access.log" combined
</VirtualHost>

<VirtualHost *:80>
ServerAdmin test1@mysite1.co.id
DocumentRoot D:/xampp/htdocs/vhosts/www.mysite3.co.id/v2
ServerName mysite3.co.id
ServerAlias mysite3.co.id
ErrorLog "logs/www.mysite3.co.id.webserver-testi-error.log"
CustomLog "logs/www.mysite3.co.id.webserver-testi-access.log" combined
</VirtualHost>

After modifying file restart your Apache. Then make sure DNS records for all the hostnames you used point to your server and at the end check if you have access from the other PCs.
Radzio
 
Posts: 81
Joined: 05. June 2010 12:26

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 91 guests