Skip to main content

Posts

Showing posts with the label nginx

Domain Specific to Application in Nginx Config

ေအာက္က ကုတ္ကုိ Nginx Config ထဲမွာ ထည့္ေပးရင္ website ကုိ ip နဲ့ေခၚလဲ ကိုယ္ေထာက္ထားတဲ့ ဒိုေမးကုိ Auto redirect လုပ္ေပးသြားမွာပါ။ if ($host != $server_name) {    rewrite ^(.*)$ http://www.domain.com permanent; } အဲဒါဆိုရင္ ကုိယ့္ဆိုဒ္အိုင္ပီကုိ ယူျပီးေတာ့ သူမ်ား Point ေထာက္တဲ့ ရန္ကုိ ကာကြယ္ႏုိင္မွာပါ။