尊龙凯时人生就是博

ÔõÑùʹÓÃNginx Proxy ManagerʵÏÖHTTPµ½HTTPSµÄ×Ô¶¯Ìøת

ÔõÑùʹÓÃNginx Proxy ManagerʵÏÖHTTPµ½HTTPSµÄ×Ô¶¯Ìøת

Ëæ×Å»¥ÁªÍøµÄÉú³¤£¬Ô½À´Ô½¶àµÄÍøÕ¾×îÏȽÓÄÉHTTPSЭÒéÀ´¼ÓÃÜ´«ÊäÊý¾Ý£¬ÒÔÌá¸ßÊý¾ÝµÄÇå¾²ÐÔºÍÓû§µÄÒþ˽±£»¤¡£ÓÉÓÚHTTPSЭÒéÐèÒªSSLÖ¤ÊéµÄÖ§³Ö£¬Òò´ËÔÚ°²ÅÅHTTPSЭÒéʱÐèÒªÓÐÒ»¶¨µÄÊÖÒÕÖ§³Ö¡£NginxÊÇÒ»¿îÇ¿Ê¢ÇÒ³£ÓõÄHTTPЧÀÍÆ÷ºÍ·´ÏòÊðÀíЧÀÍÆ÷£¬¶øNginx Proxy ManagerÊÇÒ»¸ö»ùÓÚNginxµÄ¼òÆÓÒ×ÓõÄÊðÀíÖÎÀíÆ÷£¬¿ÉÒÔʵÏÖHTTPµ½HTTPSµÄ×Ô¶¯Ìøת¡£±¾ÎĽ«ÏÈÈÝÔõÑùʹÓÃNginx Proxy ManagerÀ´ÊµÏÖÕâÒ»¹¦Ð§£¬²¢ÌṩÏêϸµÄ´úÂëʾÀý¡£

°ì·¨Ò»£º×°ÖÃNginx Proxy Manager

Ê×ÏÈ£¬ÐèÒªÔÚЧÀÍÆ÷ÉÏ×°ÖÃNginx Proxy Manager¡ £¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÀ´×°Öãº

$ git clone https://github.com/jc21/nginx-proxy-manager.git
$ cd nginx-proxy-manager
$ docker-compose up -d

µÇ¼ºó¸´ÖÆ

Õ⽫ÔÚЧÀÍÆ÷ÉÏÆô¶¯Ò»¸öDockerÈÝÆ÷£¬ÆäÖаüÀ¨ÁËNginxЧÀÍÆ÷ºÍNginx Proxy ManagerÖÎÀí½çÃæ¡£

°ì·¨¶þ£ºÉèÖÃÓòÃûºÍSSLÖ¤Êé

½øÈëNginx Proxy ManagerÖÎÀí½çÃ棬ͨ¹ýä¯ÀÀÆ÷»á¼ûЧÀÍÆ÷µÄIPµØµã£¬Ê¹ÓÃĬÈϵÄÓû§ÃûºÍÃÜÂëµÇ¼¡£

ÔÚ½çÃæµÄ×ó²àµ¼º½À¸ÖУ¬Ñ¡Ôñ¡°Proxy Hosts¡±£¬È»ºóµã»÷¡°Ìí¼ÓÖ÷»ú¡±°´Å¥¡£ÔÚµ¯³öµÄ¶Ô»°¿òÖУ¬ÊäÈëÓòÃûÐÅÏ¢ºÍSSLÖ¤ÊéµÄÏà¹ØÐÅÏ¢¡£È·±£Ñ¡ÔñÁË¡°Force SSL¡±Ñ¡ÏîÀ´Ç¿ÖÆÆôÓÃHTTPS¡£

°ì·¨Èý£ºÉèÖÃHTTPµ½HTTPSµÄ×Ô¶¯Ìøת

ÔÚNginx Proxy ManagerÖÎÀí½çÃæÖУ¬Ñ¡Ôñ¡°Proxy Hosts¡±Ñ¡Ï²¢ÕÒµ½¸Õ¸ÕÌí¼ÓµÄÖ÷»ú¡£µã»÷Ö÷»úµÄÃû³Æ½øÈëÉèÖÃÒ³Ãæ¡£

ÔÚÉèÖÃÒ³ÃæµÄ¶¥²¿£¬ÕÒµ½¡°SSL Proxy¡±Ñ¡Ïî¡£ÔÚ¡°Redirects¡±ÏÂÀ­²Ëµ¥ÖУ¬Ñ¡Ôñ¡°Redirect All Traffic to HTTPS¡±¡£

µã»÷Ò³Ãæµ×²¿µÄ¡°ÉúÑÄ¡±°´Å¥£¬ÉúÑÄÉèÖò¢Ó¦Óøü¸Ä¡£

°ì·¨ËÄ£ºÑéÖ¤ÉèÖÃÊÇ·ñÉúЧ

ÖØÐÂÆô¶¯Nginx Proxy ManagerÈÝÆ÷£¬ÒÔʹÉèÖÃÉúЧ¡ £¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÀ´ÖØÐÂÆô¶¯ÈÝÆ÷£º

$ cd nginx-proxy-manager
$ docker-compose restart

µÇ¼ºó¸´ÖÆ

È»ºó£¬Í¨¹ýä¯ÀÀÆ÷»á¼ûÉèÖõÄÓòÃû£¬ÈôÊÇÒ»ÇÐÕý³££¬»á¼û½«×Ô¶¯Ìøתµ½HTTPSЭÒ飬²¢ÇÒä¯ÀÀÆ÷µØµãÀ¸»áÏÔʾһ¸öËøͼ±ê£¬ÌåÏÖÅþÁ¬ÊÇÇå¾²µÄ¡£

´úÂëʾÀý£º

server {
    listen 80;
    server_name example.com;
    return 301 https://example.com$request_uri;
}

server {
    listen 443 ssl;
    server_name example.com;
    
    ssl_certificate /etc/nginx/ssl/cert.pem;
    ssl_certificate_key /etc/nginx/ssl/key.pem;
    
    # other configuration...
}

µÇ¼ºó¸´ÖÆ

ÔÚÉÏÃæµÄʾÀýÖУ¬µÚÒ»¸öserver¿é¼àÌý80¶Ë¿Ú£¬²¢Í¨¹ýreturn 301Ö¸Áî·µ»ØÒ»¸ö301Öض¨Ïòµ½HTTPS¡£µÚ¶þ¸öserver¿é¼àÌý443¶Ë¿Ú£¬²¢ÉèÖÃÁËSSLÖ¤ÊéµÄ·¾¶£¬²¢¿ÉÒÔƾ֤ÐèÒªÌí¼ÓÆäËûµÄÉèÖá£

×ܽ᣺

ͨ¹ýʹÓÃNginx Proxy Manager£¬ÎÒÃÇ¿ÉÒÔºÜÀû±ãµØʵÏÖHTTPµ½HTTPSµÄ×Ô¶¯Ìøת¡£Ö»ÐèÒªÔÚÉèÖýçÃæÖÐÑ¡ÔñÏìÓ¦µÄÑ¡Ï¾Í¿ÉÒÔÍê³ÉÏà¹ØµÄÉèÖá£Nginx Proxy Manager²»µ«¼ò»¯ÁËHTTPSЭÒéµÄ°²ÅÅÊÂÇ飬»¹ÌṩÁËÓѺõÄÖÎÀí½çÃ棬Àû±ãÓû§¾ÙÐÐÏà¹Ø²Ù×÷¡£Ï£Íû±¾ÎÄÄܶԸ÷ÈËÃ÷È·²¢Ê¹ÓÃNginx Proxy ManagerÓÐËù×ÊÖú¡£

ÒÔÉϾÍÊÇÔõÑùʹÓÃNginx Proxy ManagerʵÏÖHTTPµ½HTTPSµÄ×Ô¶¯ÌøתµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ