which is the simple way to force users use HTTPS Protocol . im using LE For http/2 support .
Posted at centminmod.com/nginx_domain_dns_setup.html#httpsredirect key to testing is using 302 temp redirect first in a private incognito browser session otherwise the problems you can experience may end up being due to browser caching or 301 permanent redirects unless you clear browser cache and reboot local computer(s) and even then some web browsers don't let go of 301 permanent redirect browser cache that willingly
thanks George but i could't get that - > PHP: mv /usr/local/nginx/conf/conf.d/newdomain.com.conf /usr/local/nginx/conf/conf.d/newdomain.com.conf-disabled after disabling the vhost what should i do ? i think i must - > PHP: mv /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf /usr/local/nginx/conf/conf.d/newdomain.com.conf
please explain me clearly ? i'm confused can you give me a screenshot or something ? if i disable my vhost my website will be down ! because i don't have any vhost configurations ! so now what ?
When you create a new nginx vhost domain via centmin.sh menu option 2 or /usr/bin/nv cli command line, you will create the Nginx vhost files and directories. You will get an outputted the path location where it will create the domain name's vhost conf file named newdomain.com.conf (and newdomain.com.ssl.conf if you selected yes to self signed SSL) Nginx vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.conf Nginx HTTP/2 SSL vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf Nginx Self-Signed SSL Certificate Directory at /usr/local/nginx/conf/ssl/newdomain.com Vhost public web root will be at /home/nginx/domains/newdomain.com/public Vhost log directory will be at /home/nginx/domains/newdomain.com/log So you'd have 2 nginx vhost files http one at /usr/local/nginx/conf/conf.d/newdomain.com.conf which you rename to disable it and https one at /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf leaving you with that one to use for https site and then follow instructions at Nginx Vhost & NSD DNS Setup - CentminMod.com LEMP Nginx web stack for CentOS to add the http to https redirect into https vhost at /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf
i have problem with DNS , I made a ns1.mydomain.com + ns2.mydomain.com ( with my ipaddress ) and when i set my domain name servers to ns1 and ns2.mydomain.com i get error i want to know is centminmod DNS ( NSD ) Will automaticly make an child host ?
For NSD locally hosted DNS see Domains - Domain name DNS setup on local NSD server | Centmin Mod Community However, for uptime, reliability and performance, i'd use 3rd party hosted DNS and not do it locally on same server. It's easy to use Cloudflare just for DNS without the caching/CDN/WAF if you want.