Page 1 of 1

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

PostPosted: 23. December 2010 22:53
by larrius
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

Re: It works without www. but doesnt when used

PostPosted: 24. December 2010 00:18
by Sharley
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.

Re: It works without www. but doesnt when used

PostPosted: 24. December 2010 15:27
by larrius
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 :)

Re: It works without www. but doesnt when used

PostPosted: 24. December 2010 16:07
by WilliL
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 ;)

Re: It works without www. but doesnt when used

PostPosted: 24. December 2010 17:00
by larrius
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.