Question
adding www to my domain at nginx server
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×Look at here:
According to this link the solution is:
server {
server_name domain1.com;
rewrite ^(.*) http://www.domain1.com$1 permanent;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /home/user/www/domain1;
index index.php index.html index.htm;
server_name www.domain1.com;
include hhvm.conf;
}