It works without www. but doesnt when used [Fixed thanks]

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

It works without www. but doesnt when used [Fixed thanks]

Postby larrius » 23. December 2010 22:53

Hi, im new to the forum, been reading lot of thread and im currently working as a webserver technician.

Here's my little problem.

I got a website running on Xamp lastest versions.

We recently changed the ns to a new ip adresse, but it's been a week now. when i type in "fake.com" in browser it works but when i type "www.fake.com" it doesnt work anymore.

i get a timeout error on dns.

Im pretty sure the problem come from the A records from my dns... but they got the good ip since a week, and i tried my website from multiple proxies to make sure it was updated and it does the same thing as when i try it with my own computer.

my http-ssl.conf looks like this :

###
<VirtualHost *:443>
# General setup for the virtual host
DocumentRoot "D:/www/www.fake.com/"
ServerName fake.com:443
ServerAlias http://www.fake.com:443
ServerAdmin jean@fake.com
ErrorLog "logs/fake.local.log"
<IfModule log_config_module>
CustomLog "logs/fake.access.log" combined
</IfModule>
###

it's only the first part, but if you need more information tell me.

I want your opinions on this little problem, i tried looking on the forum but search with WWW in it doesnt give me any good topics.

thanks again
Last edited by larrius on 24. December 2010 17:08, edited 1 time in total.
larrius
 
Posts: 5
Joined: 23. December 2010 22:42

Re: It works without www. but doesnt when used

Postby Sharley » 24. December 2010 00:18

You could try dropping the :443 from both the ServerName and the ServerAlias or just from the sub-domain name www.fake.com and see how it goes - trial and error may prevail here.

You have already told Apache to listen for any address on port 443 (https).
Code: Select all
ServerName fake.com
ServerAlias www.fake.com

Save the file and restart Apache to have your edits read.

Also familiarize yourself with your Apache error log files which can be found here on a default installation:
C:\xampp\apache\logs\error.log
and here for your SSL VirtualHost:
C:\xampp\apache\logs\fake.access.log

Drag and drop into your text editor to read or associate .log file extensions with your text editor.

The SSL certificate you use can only be tied to fake.com or another certificate tied to www.fake.com or you could use a wild card certificate - normally only one domain (IP address) can be tied to one certificate and www is classed as a sub-domain (another domain).

As I see it http://fake.com and http://www.fake.com both resolve to your web site FAKE LANDSCAPES at your hosting service.

Neither of the SSL addresses resolve:
https://fake.com or https://www.fake.com with or without the :443 or the http or https bits used.

Seems to be a certificate issue perhaps.

The default SSL certificate in XAMPP is created for just https://localhost and can be found in C:\xampp\apache\conf\ssl.crt and if that resolves then the certificate and configurations are correct for localhost.

You can use the above existing ssl folders as templates or as examples.

You may have to create certificates for your local fake.com sites in XAMPP using C:\xampp\apache\bin\openssl.exe at a command prompt or in the Shell from the XAMPP Control Panel - at the openssl> prompt type ? for help with commands.

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: It works without www. but doesnt when used

Postby larrius » 24. December 2010 15:27

Thanks for the quick reply,

ive removed :443 thanks to you, i didnt know i could remove it.

Altough my problem still persist, i forgot to mention i do not have any error at all, not from error.log or my website log. it seems when i type in www. it never reach my server at all

here is the real www : http://www.ddimpressions.com as you will see it doesnt work and end up timing out (if i didnt fix it by then hehe) but without the www if you just type in, ddimpressions.com it will work and redirect you to https:// with a self signed certificate.

So far i don't care that the certificat doesnt work, i have yet to give the csr to a company so they can make the crt. i just want to test it with the self signed one for testing and security purpose.

My config shouldnt be a problem, i mean it's the same config, but only switched the static IP we're using to an other one.

i simply just don't get why my server answer to the ip without www and timeout when i use the www


Edit : i just remember, my site doesnt work if i only put the settings in ssl.conf, i also need to have it in my vhost.conf with port 80... unsure if it's good or not because this website never had problems in years and my old notes are kinda confusing. is this normal ? the load ssl and include ssl part of http.conf are set corretly by the way :)
larrius
 
Posts: 5
Joined: 23. December 2010 22:42

Re: It works without www. but doesnt when used

Postby WilliL » 24. December 2010 16:07

larrius wrote:here is the real www : http://www.ddimpressions.com as you will see it doesnt work and end up timing out (if i didnt fix it by then hehe) but without the www if you just type in, ddimpressions.com it will work and redirect you to https:// with a self signed certificate.

I reached your site, it works.
I was asked if i like to accept your certficate. When i accepted it your site was shown.

DD Impressions
4690, rue Jean-Paul Gagnon
Terrebonne, Québec
Canada, J6Y 1B2

Just a guess: you changed s.th. and didn't cleared browsers cache.

PS:
contact.php: "Carte" isn't shown - error: not allowed in a frame ;)
Willi
WilliL
 
Posts: 661
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: It works without www. but doesnt when used

Postby larrius » 24. December 2010 17:00

EDIT :

must have been the modification i made with the previous user then, cause im using proxies to test my server since they dont have my website in cache, it isnt an issue.

Oh well, im happy it works then :D

i am unsure if it's the config i tried to modify with the last user, or the stuff i did this morning or the ip finally working, but oh well it works ! gotta test some stuff :D

thanks a lot for your time.
larrius
 
Posts: 5
Joined: 23. December 2010 22:42


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 85 guests