Changing domain

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

Changing domain

Postby Harpist » 01. July 2011 23:57

Hi folks,

I have just transferred an old web site from GoDaddy to my own Windows XP machine. I got it running using XAMPP with "localhost" as the server name. After getting everything up and running, I am now trying to re-configure the website to work against a domain name (e.g. www.example.com).

1. I set up my router for port forwarding
2. I modified the ServerName attribute in httpd.conf (changed it to "www.example.com")
3. Restarted apache

I know I'm missing at least one step. Any assistance is welcome.

Thanks

Harpist
Harpist
 
Posts: 15
Joined: 30. June 2011 19:40
Operating System: WinXP Professional Ver2002 SP3

Re: Changing domain

Postby peterwt » 02. July 2011 01:17

I assume from what you said that you have a domain name for this website which was bought from and hosted on GoDaddy.

You will need to point your domain to your ip address. If you have a permanent ip address you can do this with your GoDaddy domain control panel so that the nameserver for your domain points to your ip address.

if you do not have a fixed ip address there is a free service at http://www.zonedit.com to change the ip address when it is changed by your isp.

You should be aware however that xampp is not meant to be used as a production server and there are severe security implications in using xampp in this way. In particular secure webdav.

Peter
Peter
peterwt
 
Posts: 42
Joined: 17. March 2009 11:06
Operating System: Windows 7 64 bit Professional

Re: Changing domain

Postby Harpist » 02. July 2011 02:22

peterwt wrote:I assume from what you said that you have a domain name for this website which was bought from and hosted on GoDaddy.

You will need to point your domain to your ip address. If you have a permanent ip address you can do this with your GoDaddy domain control panel so that the nameserver for your domain points to your ip address.

if you do not have a fixed ip address there is a free service at http://www.zonedit.com to change the ip address when it is changed by your isp.

You should be aware however that xampp is not meant to be used as a production server and there are severe security implications in using xampp in this way. In particular secure webdav.

Peter


Peter,

1. I had already redirected the domain name from GoDaddy to my router.
2. I have a static IP address for my modem/router

I am aware of the security risk (at least the risk that has been documented on this site). I am using xampp as a temporary fix while I get a better hosting service. GoDaddy has gotten so slow that my scripts are timing out 3 times out of 4.

An I missing something else? It looks like the requests are getting to the router. Is there anywhere else in the .conf files that the domain name should be set? I have done this with IIS before but have only used apache with localhost.

Thanks

Harpist
Harpist
 
Posts: 15
Joined: 30. June 2011 19:40
Operating System: WinXP Professional Ver2002 SP3

Re: Changing domain

Postby Sharley » 02. July 2011 03:09

Virtual Hosts.
Not essential but, IMHO, works much better than not using it as it allows you to still maintain and access localhost and that is to use a VirtualHost.

This can be configured in the C:\xampp\apache\conf\extra\httpd-vhosts.conf file but first and most importantly you must return your httpd.conf file back to the default settings used after installing XAMPP.

Here is an example vhost configuration for you to experiment with by replacing my red entries with your actual settings.
NameVirtualHost *:80

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

<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot "C:/xampp/htdocs/example"
<Directory "C:/xampp/htdocs/example" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "C:/xampp/htdocs/example/cgi-bin/"
ServerAdmin serveradmin@example.com
CustomLog example_access.log combined
ErrorLog example_error.log
LogLevel error
</VirtualHost>
Items in red need to be edited with your actual names.
DocumentRoot, Directory and ScriptAlias must be identical folders and can be located anywhere suitable on your PC.

Save the file after editing and restart Apache to have the file read.

Now try and access http://example.com and http://www.example.com in your browser.

Read the C:\xampp\apache\logs\error.log file if you have any issues on re-starting Apache.

If you do have issues then please paste here your complete httpd-vhosts.conf file or if you have issues with sensitive data then please feel free to paste it in a PM (forum Personal Message) to me.

Hopefully the above will have you moving forward.

If it's any consolation, I too moved multiple sites away from GoDaddy for much the same reasons as you, plus their website seems to be loaded with tricky traps for the unwary and is extremely slow to use for anything worth while, like configuring the domains and web hosting settings - a cPanel/WHM host is a much preferred option IMHO.

Good luck.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Changing domain

Postby Harpist » 02. July 2011 03:32

Ms. Sharley,

I'll give this a shot and let you know how it works. GoDaddy just got sold to a private equity firm for $2.25 billion. Their focus has obviously not been on providing quality hosting.

Thanks for the help

Harpist
Harpist
 
Posts: 15
Joined: 30. June 2011 19:40
Operating System: WinXP Professional Ver2002 SP3

Re: Changing domain

Postby Sharley » 02. July 2011 03:44

Harpist wrote:I'll give this a shot and let you know how it works.
If you do have issues then you can test it is passing through your router acting as a visitor from the Internet by using this link and ticking all the boxes after adding your domain name or your IP to the text box:
http://centralops.net/co/DomainDossier.aspx
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Changing domain

Postby peterwt » 02. July 2011 11:25

Another quick test is to enter your static ip address in a browser - this will bypass any problems in your domain name being resolved to your ip address.

If this does not work check your port forwarding and that you are allowing apache through any firewalls. I assume that your isp does no block port 80 - some do.

Peter
Peter
peterwt
 
Posts: 42
Joined: 17. March 2009 11:06
Operating System: Windows 7 64 bit Professional

Re: Changing domain

Postby Harpist » 02. July 2011 15:12

peterwt wrote:Another quick test is to enter your static ip address in a browser - this will bypass any problems in your domain name being resolved to your ip address.

If this does not work check your port forwarding and that you are allowing apache through any firewalls. I assume that your isp does no block port 80 - some do.

Peter


Peter,

I had tried the static IP earlier without luck. And the port 80 isn't blocked.

I see the traffic at the router when I use the domain name and/or static IP. I'm just not sure where it goes from there.

Harpist
Harpist
 
Posts: 15
Joined: 30. June 2011 19:40
Operating System: WinXP Professional Ver2002 SP3

Re: Changing domain

Postby peterwt » 05. July 2011 11:56

You said in an earlier posting that you had got IIS working previously. Try this again and if it works you will know the problem is apache.

I have tried in the past to run my site using zonedit and had it working. I did not make any changes to the httpd.conf. The only problem I encountered was with firewalls.
Peter
peterwt
 
Posts: 42
Joined: 17. March 2009 11:06
Operating System: Windows 7 64 bit Professional

Re: Changing domain

Postby JonB » 05. July 2011 13:20

A. - Did you update your nameservers???


B. - what happens when you ping your domain???
c:\>ping www.example.com

What error do you get??? The error will tell you 'what type' of problem you have

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: Changing domain

Postby Harpist » 05. July 2011 17:41

JonB wrote:A. - Did you update your nameservers???


B. - what happens when you ping your domain???
c:\>ping http://www.example.com

What error do you get??? The error will tell you 'what type' of problem you have

Good Luck
8)


JonB,

We have had internet problems all weekend (they tech support guys were obviously off celebrating the 4th) so I haven't done much.

Pinging the domain works fine (I get the correct IP back). It looks like I get the correct message on the router but then I get no message in the apache logs.

Previous, on my home network I had a Windows 2003 server running IIS for all my services (web, FTP, POP, SMTP). Everything ran without too much of a problem. But when the boot drive on this machine failed, I decided to go back to Windows XP and use apache (I never liked the rigidity of Windows 2003 Server). I considered going to Linux, but I don't have a lot of experience configuring Linux.

It may be that the port forwarding is not working. But I haven't changed the configuration there and the port forwarding was working when I was using IIS under Windows 2003 server.

My thinking is I either haven't configured something right in Windows XP or apache. Probably something "simple".

Good Roads

Harpist


Just and additional note: I can come in remotely with the remote desktop function using the domain name so the domain name is obviously resolving correctly and the port forwarding for remote desktop is working fine. What am I missing??
Harpist
 
Posts: 15
Joined: 30. June 2011 19:40
Operating System: WinXP Professional Ver2002 SP3

Re: Changing domain

Postby JonB » 05. July 2011 18:14

Umm - did we check the Windows Firewall for an Apache exception??

BTW - I have two Windows 2003 servers, very reliable. I only use the IIS part from MS, though. I use hMail for SMTP/POP and Ipswitch for FTP (before the very nice Filezilla came along and was free) I also run PHP, Active States Perl, Python and MySQL on them (plus a lot of other 'stuff').

I know everyone says software RAID is slow - but its cheap and it sure works. Both servers are on their third set of drives (40, 60, then 120), conveniently done by cycling, the drives and re-synching. Nice. You just can't change the size of the boot partition nor can you change (easily, at least) the drive architecture. AND that ASR everyone complains about - works perfectly, provided you follow the rules. I had one sever lose BOTH drives last year. With my diskette, two new drives and my Windows Backup on a Passport USB drive, I was able to restore a 60 GB server in a couple hours. I didn't have to do anything, it actually brought itself back up! You coulda knocked me over when it started itself - no reboot... (You do have to break the mirrors with a sleight of hand, and then allow them to re-synch)

Anyway, 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: Changing domain

Postby Harpist » 06. July 2011 05:11

Howdy folks,

Well, it turned out to be a problem with my modem firmware. It took me two days to work my way up through the tech support chain at my ISP to find out that they had a problem with their most recent modem firmware upgrade. I went back one version in the firmware and everything worked.

Thanks for everyone's input!

I did run into another problem (independent of apache) and any assistance would be greatly appreciated. Everything works great when I am accessing the server from outside the network. But from inside the network, I can't access any server functions using the domain name. I assume that I can't connect to the modem using its associated domain name.

Any advice? This has to be a pretty ommon situation.

Good Roads

Harpist
Harpist
 
Posts: 15
Joined: 30. June 2011 19:40
Operating System: WinXP Professional Ver2002 SP3

Re: Changing domain

Postby WilliL » 06. July 2011 13:12

did you extend hosts file of xp?
c:/windows/system32/drivers/etc/hosts
127.0.0.1 yourdomain.ext http://www.yourdomain.ext # NO i-net check more possible
127.0.0.1 mdom # serveralias in vhosts <yourdomain.ext> necessery
Willi
WilliL
 
Posts: 661
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: Changing domain

Postby Harpist » 07. July 2011 16:59

WilliL wrote:did you extend hosts file of xp?
c:/windows/system32/drivers/etc/hosts
127.0.0.1 yourdomain.ext http://www.yourdomain.ext # NO i-net check more possible
127.0.0.1 mdom # serveralias in vhosts <yourdomain.ext> necessery


WilliL,

Hosts file - crud - how did I forget that! The problem is that I do this kind of stuff so rarely, I forget some of the steps.

The real problem is that statisticians like me shouldn't be allowed to do IT work. I get everything correct "on average" (the old joke about the three statisticians that go hunting bear. When a grizzly charges, one statistician fires and misses by a foot to the right. The second fires and misses by a foot to the left. The third statistician walks away because he know that "on average" the bear is dead.).

Thanks for the help. I think I will go bear hunting *grin*.

Good Roads

Harpist
Harpist
 
Posts: 15
Joined: 30. June 2011 19:40
Operating System: WinXP Professional Ver2002 SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 30 guests