Control Web Panel

WebPanel => CentOS-WebPanel GUI => Topic started by: robaczek on September 24, 2018, 04:46:43 PM

Title: non WWW to WWW and HTTP to HTTPS??
Post by: robaczek on September 24, 2018, 04:46:43 PM
Hi all, I'm new to all of this and just installed CWP7.0 pro and everything seem to be working fine, except, when I visit my website with WWW it loads just fine, but when I try to load it up without it, it shows the /cgi-sys/defaultwebpage.cgi webpage.

Same goes for redirecting the traffic from HTTP to HTTPS - my site is visible under both protocols.

I tried the usual route via HTACCESS file, but sadly it doesn't work.. Is there a place in the panel where I can configure this behaviour or some other way I can achieve this? Any help would be greatly appreciated.
Title: Re: non WWW to WWW and HTTP to HTTPS??
Post by: Jamshed Datori on September 25, 2018, 09:06:42 AM
Which web server you are using? Apache, Apache + nginx or varnish??
Title: Re: non WWW to WWW and HTTP to HTTPS??
Post by: robaczek on September 30, 2018, 09:57:16 AM
Which web server you are using? Apache, Apache + nginx or varnish??

Apache + nginx + varnish
Title: Re: non WWW to WWW and HTTP to HTTPS??
Post by: bullten on September 30, 2018, 11:31:54 AM
If www is working and without www redirecting to /cgi-sys/defaultwebpage.cgi then that means you are redirected to cpanel for all other protocols except www. Look in your domain dns.
Title: Re: non WWW to WWW and HTTP to HTTPS??
Post by: robaczek on September 30, 2018, 11:54:33 AM
I'm managing my DNS on Cloudflare where I can see all entries point to my server IP address. What entry should I look for / add in order to achieve the required effect?

I have an A record for my domain.com that points to my server IP
I have a CNAME for WWW that is an alias of my domain.com

what else should I have?