Hello boss
my website host on nginx 14.1 server with ubuntu 18.4 i install ssl letsencypty by Certbot
this way sudo certbot --nginx -d godsunsat.com -d www.godsunsat.com
this is my file /etc/nginx/sites-available/example.com
server {
root /var/www/godsunsat.com/public_html; index index.php index.html index.htm index.nginx-debian.html; server_name www.godsunsat.in godsunsat.com; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; } location ~ /\.ht { deny all; }
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/www.godsunsat.com/fullchain.pem; # ma$
ssl_certificate_key /etc/letsencrypt/live/www.godsunsat.com/privkey.pem; # $
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot}
server {
if ($host = www.godsunsat.com) {
return 301 https://$host$request_uri;
} # managed by Certbotif ($host = godsunsat.com) {
return 301 https://$host$request_uri;
} # managed by Certbotlisten 80 default_server; listen [::]:80 default_server; server_name www.godsunsat.com godsunsat.com; return 301 https://www.godsunsat.com/$request_uri; return 404; # managed by Certbot
}
My website open 2 url look this https://godsunsat.com and https://www.godsunsat.com
but I want it open like this url https://www.godsunsat.com/ please help how to fix
i am not developer Still work plz Show easy way