-1
I have an Ngnix server with the following configuration:
server {
listen 80;
server_name .dominio.com.br;
root /home/dominio.com.br/public;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/dominio.com.br-error.log error;
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
I configured in my domain the DNS as follows:
Registration type A with name @
pointing to my server IP
Type record CNAME
by name www
pointing to @
Type record CNAME
by name *
pointing to @
If I enter using the address dominio.com.br
goes normal.
If I enter using the address www.dominio.com.br
it redirects to dominio.com.br
without the www
(I don’t want that to happen)
If I enter using the address qualquercoisa.dominio.com.br
it accesses normal also without redirecting.
If the person enters any of these links informed above everything should be pointing to the same application as this folder /home/dominio.com.br/public
If the person enters by typing only domain.com.br I will redirect to www.dominio.com.br
Why the www
is redirecting to without www
? Can you tell me where I’m going wrong or what I’m missing?
Didn’t work no
– rodrigoum
put as ta your dns to become easier
– Otto
DNS added in my question edition.
– rodrigoum
sorry but imgs are blocked here at the company I can’t see ... when I get home I’ll try to help you
– Otto