domain.com not redirected to www.domain.com

Events happening in the community are now at Drupal community events on www.drupal.org.
yazzou's picture

Hello,
I have tried to make a redirection from domain.com to www.domain.com but still i am getting 404 error when i type domain.com
On aegir web interface i have added for the concerned site in the Domain aliases field :
domain.com

I checked the Redirect domain aliases to main domain.

I have checked nginx config file for the vhost, here is what i got :

server {
listen xx.xx.xx.xx:80;
server_name essai.domain.com;
rewrite ^ $scheme://www.domain.com$request_uri? permanent;
}
server {
listen xx.xx.xx.xx:80;
server_name domain.com;
rewrite ^ $scheme://www.domain.com$request_uri? permanent;
}

server {
include /var/aegir/config/includes/fastcgi_params.conf;
limit_conn gulag 10; # like mod_evasive - this allows max 10 simultaneous connections from one IP address
listen xx.xx.xx.xx:80;
server_name www.domain.com;
root /var/aegir/public_html;
# Extra configuration from modules:
include /var/aegir/config/includes/nginx_advanced_include.conf;
}
The redirection works with
Any suggestion ?
Thanks in advance

Comments

I had the same issue last

geofftech's picture

I had the same issue last night - It appear that the DNS is cached locally somewhere.

I rebooted the VPS and the 404's all started working again.

I just did that but nothing

yazzou's picture

I just did that but nothing has changed.

This is very weird because i

yazzou's picture

This is very weird because i have installed my sites on aegir setup by barracuda, on new server. It is happening on every site.

You don't need to add any

omega8cc's picture

You don't need to add any aliases, it is auto-generated for you - but only in Octopus.

What is the output from:

curl -I domain.com
curl -I www.domain.com

Or maybe you are using Barracuda hostmaster? It is NOT recommended, because then you need to configure there everything normally configured out of the box in Octopus.

Ha ok! Let me clarify. I have

yazzou's picture

Ha ok! Let me clarify. I have installed barracuda and then run octopus. The aegir generated by octopus is dedicated to domain where i will be proposing for my members to create their site, online shop on the fly (after i understand how everything works obviously :)...the other domains i have, i am adding them throught the aegir generated by barracuda (maybe it is what you call 'Barracuda hostmaster). So you recomend not doing so ? Should i remove all the sites and install them on another aegir ?
Thanks

I have deleted all the sites

yazzou's picture

I have deleted all the sites from the main aegir instance. I all moved them to the aegir created by octopus...and still i have this issue of 404 error.

curl -I domain.com
curl: (6) Couldn't resolve host 'domain.com'

curl -I www.domain.com
HTTP/1.1 200 OK
Server: Barracuda/1.0.5
Date: Sun, 04 Sep 2011 07:55:22 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/5.2.17
X-Drupal-Cache: MISS
Etag: "1315122922-0"
X-Generator: Drupal 7 (http://drupal.org)
Cache-Control: public, max-age=0
Last-Modified: Sun, 04 Sep 2011 07:55:22 +0000
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Vary: Cookie
X-Header: Barracuda Engine 1.0 Turbo

I have reinstalled everything

yazzou's picture

I have reinstalled everything Barracuda, octopus and then added a site to aegir generated by octopus, but still have the same issue....

You already answered your own

omega8cc's picture

You already answered your own question:

curl -I domain.com
curl: (6) Couldn't resolve host 'domain.com'

This simply means that you don't have correct DNS entry for "domain.com". It is unrelated to your BOA setup.

My dns setup is the

yazzou's picture

My dns setup is the following

$ttl 38400
domain.com. IN SOA nsxxx.ovh.net. postmaster.domain.com. (
2011082408
10800
3600
604800
38400 )
domain.com. IN NS nsxxx.ovh.net.
IN NS sdnsx.ovh.net.
domain.com. IN A xx.xx.xx.xx

Fixing your DNS issues is out

omega8cc's picture

Fixing your DNS issues is out of scope of the project and this group, but something must be wrong there if you are receiving the error you posted.

Ok thank you for giving me

yazzou's picture

Ok thank you for giving me the direction, and for your time.Actually i had a doubt because when running Octopus i did not touch the DNS settings, everything was done by the script apparently beacause i could access the aegir instance just by typing www.domain.com and not by typing domain.com

I will try to ask on another forum !
Best Regards

BOA

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: