Quick Install Nginx in CentOS7 + 301 Redirect
1sudo yum install epel-release
2sudo yum install nginx
3sudo systemctl start nginx
4...
5...
6edit /etc/nginx/nginx.conf
7
8...
9...
10#add this line in bottom of 'server' block:
11Redirect 301 https://your_domain_here/$request_uri;
12
13sudo systemctl restart nginx
14sudo systemctl enable nginx