Commit 32df78dd authored by HERBERT Ryan's avatar HERBERT Ryan

nginx configuration added http redirect

In order to make the change to https seemless for users, nginx will now
automatically redirect users from old http urls to the new https ones.
parent 03a00166
server {
listen 80;
server_name $hostname;
return 301 https://$hostname$request_uri;
}
server {
listen 443 default_server ssl;
......
......@@ -62,6 +62,12 @@ gzip_types text/plain text/css application/json application/x-javascript text/xm
# Create configuration file /etc/nginx/sites-available/web2py
echo "server {
listen 80;
server_name \$hostname;
return 301 https://\$hostname$request_uri;
}
server {
listen 443 default_server ssl;
server_name \$hostname;
ssl_certificate /etc/nginx/ssl/web2py.crt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment