NginX redirect http url to https url

--more info--
see other info on http://nginx.org/

--knowing issue--
it is assumed that nginx is installed perfectly and https config is ready

--1--
open your nginx configuration
# vi /usr/local/nginx/conf/nginx.conf 
take a look on this config
server {
        listen       80;
        server_name 192.168.1.152;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location / {
        rewrite ^/aku(.*) https://192.168.1.152/aku$1 permanent;
            root   html;
            index  index.html index.htm;
       }
on the red line is the configuration. add that config to your configuration file

--check n jajal --







source : http://markmail.org


Previous
Next Post »

comment please ... ConversionConversion EmoticonEmoticon

Thanks for your comment