ÔõÑùʹÓÃNginx Proxy ManagerʵÏÖ»ùÓÚÓòÃûµÄÐéÄâÖ÷»úÉèÖÃ
ÔõÑùʹÓÃNginx Proxy ManagerʵÏÖ»ùÓÚÓòÃûµÄÐéÄâÖ÷»úÉèÖÃ
NginxÊÇÒ»¿î¸ßÐÔÄܵĿªÔ´WebЧÀÍÆ÷Èí¼þ£¬ÒòÆäÎȹÌÐÔºÍÎÞаÐÔ¶ø¹ãÊܽӴý¡£NginxµÄ¹¦Ð§¿ÉÒÔͨ¹ýÔÚÉèÖÃÎļþÖнç˵¶à¸öÐéÄâÖ÷»úÀ´ÊµÏÖ£¬ÕâÑù¿ÉÒÔ½«²î±ðµÄÓòÃûÖ¸Ïò²î±ðµÄЧÀÍÆ÷¡£
¶øNginx Proxy ManagerÊÇ»ùÓÚNginx¿ª·¢µÄÒ»¿î¼òÆÓÒ×ÓõÄWeb½çÃæÖÎÀí¹¤¾ß£¬ËüÌṩÁËÓѺõIJÙ×÷½çÃ棬¿ÉÒÔ×ÊÖúÎÒÃÇÇáËÉÖÎÀíNginxµÄÐéÄâÖ÷»úÉèÖá£
ÏÂÃ潫ÏÈÈÝÔõÑùʹÓÃNginx Proxy ManagerʵÏÖ»ùÓÚÓòÃûµÄÐéÄâÖ÷»úÉèÖãº
µÚÒ»²½£º×°ÖÃNginx Proxy Manager
Ê×ÏÈ£¬ÎÒÃÇÐèҪװÖÃNginxºÍNginx Proxy Manager¡£¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÀ´×°Öãº
# ×°ÖÃNginx sudo apt update sudo apt install nginx # ×°ÖÃNginx Proxy Manager sudo apt install npm -y sudo npm install -g npm sudo npm install -g n sudo n lts sudo npm install -g node-gyp sudo apt install python2 -y sudo apt install build-essential -y sudo apt install git -y git clone https://github.com/jc21/nginx-proxy-manager.git cd nginx-proxy-manager npm uninstall bcrypt npm install bcrypt npm run postinstall
µÇ¼ºó¸´ÖÆ
×°ÖÃÍê³Éºó£¬ÎÒÃÇ¿ÉÒÔͨ¹ý»á¼ûЧÀÍÆ÷µÄIPµØµãÀ´»á¼ûNginx Proxy ManagerµÄÖÎÀí½çÃ棬ĬÈ϶˿ÚΪ81¡£
µÚ¶þ²½£ºÌí¼ÓÖ÷»ú
ÔÚNginx Proxy ManagerµÄÖÎÀí½çÃæÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýµã»÷×ó²àµÄ¡°ÊðÀíÖ÷»ú¡±²Ëµ¥À´Ìí¼ÓÐéÄâÖ÷»ú¡£
µã»÷¡°Ìí¼Ó¡±°´Å¥£¬È»ºóÌîдÓòÃû¡¢Ä¿µÄÖ÷»úºÍÄ¿µÄ¶Ë¿ÚµÈÐÅÏ¢£¬×îºóµã»÷¡°ÉúÑÄ¡±°´Å¥¡£ÕâÑù¾ÍÀÖ³ÉÌí¼ÓÁËÒ»¸öÐéÄâÖ÷»ú¡£
µÚÈý²½£ºÐÞ¸ÄÓòÃûÆÊÎö
ΪÁËÈÃÎÒÃÇÌí¼ÓµÄÐéÄâÖ÷»úÉúЧ£¬ÎÒÃÇÐèÒª½«ÓòÃûÆÊÎöÖ¸ÏòÎÒÃǵÄЧÀÍÆ÷IPµØµã¡£
ÔÚDNSÆÊÎöЧÀÍÌṩÉ̵ÄÖÎÀí½çÃæÖУ¬ÕÒµ½ÓòÃûÆÊÎöÉèÖã¬Ìí¼ÓÒ»ÌõA¼Í¼£¬½«ÓòÃûÖ¸ÏòЧÀÍÆ÷µÄIPµØµã¼´¿É¡£
µÚËIJ½£º²âÊÔ»á¼û
ÔÚÍê³ÉÒÔÉÏ°ì·¨ºó£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÔÚä¯ÀÀÆ÷ÖÐÊäÈëÓòÃûÀ´»á¼ûÐéÄâÖ÷»ú¡£Nginx Proxy Manager»áƾ֤ÓòÃûÆÊÎö½«ÇëÇóת·¢µ½ÏìÓ¦µÄÄ¿µÄÖ÷»úºÍÄ¿µÄ¶Ë¿Ú¡£
´úÂëʾÀý£º
ÒÔÏÂÊÇÒ»¸öNginxÉèÖÃÎļþʾÀý£¬Í¨¹ýʹÓÃNginx Proxy Manager¿ÉÒÔ×Ô¶¯ÌìÉúºÍÖÎÀíÕâÑùµÄÉèÖÃÎļþ£º
server { listen 80; server_name example.com; location / { proxy_pass http://target_server:80; } }
µÇ¼ºó¸´ÖÆ
ÔÚÒÔÉÏʾÀýÖУ¬ÎÒÃǽç˵ÁËÒ»¸öÐéÄâÖ÷»ú£¬½«ÓòÃûexample.comÖ¸Ïòtarget_serverµÄ80¶Ë¿Ú¡£
ÐèҪעÖصÄÊÇ£¬ÔÚʹÓÃNginx Proxy Managerʱ£¬ÎÒÃDz»ÔÙÐèÒªÊÖ¶¯ÐÞ¸ÄNginxµÄÉèÖÃÎļþ£¬ËùÓеÄÉèÖö¼¿ÉÒÔͨ¹ýͼÐνçÃæ¾ÙÐвÙ×÷¡£
×ܽ᣺
ʹÓÃNginx Proxy Manager¿ÉÒÔ×ÊÖúÎÒÃÇÇáËÉʵÏÖ»ùÓÚÓòÃûµÄÐéÄâÖ÷»úÉèÖá£Í¨¹ý¼òÆӵIJÙ×÷£¬ÎÒÃÇ¿ÉÒÔÖÎÀí¶à¸öÐéÄâÖ÷»ú£¬²¢ÇÒÎÞÐèÊÖ¶¯ÐÞ¸ÄNginxµÄÉèÖÃÎļþ¡£
ÎÞÂÛÊÇСÎÒ˽ÈËÍøÕ¾ÕÕ¾ÉÆóÒµ¼¶Ó¦Ó㬶¼¿ÉÒÔʹÓÃNginx Proxy ManagerÀ´¼ò»¯ÉèÖÃÖÎÀí£¬Ìá¸ßÔËάЧÂÊ¡£Ï£ÍûÒÔÉÏÄÚÈÝÄܹ»¶ÔÄãÓÐËù×ÊÖú¡£
ÒÔÉϾÍÊÇÔõÑùʹÓÃNginx Proxy ManagerʵÏÖ»ùÓÚÓòÃûµÄÐéÄâÖ÷»úÉèÖõÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡