how to use cloudflare SSL with nginx Print this Article
Using cloudflare for your website gives so many of options and flexibility for your web.
- Free DNS service
- Free SSL ( comodo signed )
- Free Basic D-dos prevention
- rules to shape your traffic
- basic cached page serving which helps to reduce bandwidth usage. and many more
You can start using free services of cloudflare by only adding your domain ans signing up. you will get two name servers once you added domain to cloudflare. update your name server to your domain control panel and it is ready to use.
your all request will be served from cloudflare and your visitor cannot track your real server IP and instead they will get two cloudflare ip. Because cloudflare uses geo location wide its servers to serve cached pages of your web so the request processed a bit fast.
Today we will get to know how can some one use cloudflare SSL certificate freely.
cloudflare gives free comodo domain certify SSL. for that you go to encrypt section of your domain in cloudflare and set this to “FULL”
rest you can now create a self signed certificate on your linux/windows server
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/ssl-selfsigned.key -out /etc/ssl/certs/ssl-selfsigned.crt
Add following line in your server tag in nginx config file
# vim /etc/nginx/sites-enabled/default
|listen 443 ssl http2;|
|index index.php index.html index.htm;|
add one more server tag for port 80 to redirect all http request to https . Extend these lines at the last of file
|listen 80 ;|
|return 301 https://$host$request_uri;|
check your config with nginx -t
and apply config by restarting server
service nginx restart
Was this answer helpful?
Xmlrpc is a type of attack in which your site goes down and if you see the error log of nginx...
Some users uses plugin for enabling next page or page break button in wordpress editor. This...
If we need a high traffic website host on apache due to .htaccess rules ( which is very painfull...
If you have opted crazytech india KVM VPS for hosting a high traffic wordpress website then we...
NTP is a service in unix/linux which synchronize local server time with public time (NTP)...
Powered by WHMCompleteSolution