{"id":36302,"date":"2025-05-09T08:40:55","date_gmt":"2025-05-09T00:40:55","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/36302.html"},"modified":"2025-05-09T08:40:55","modified_gmt":"2025-05-09T00:40:55","slug":"%e9%83%a8%e7%bd%b2%e8%8b%a5%e4%be%9d%e9%a1%b9%e7%9b%ae%e5%88%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%81%87%e5%88%b0%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/36302.html","title":{"rendered":"\u90e8\u7f72\u82e5\u4f9d\u9879\u76ee\u5230\u670d\u52a1\u5668\u9047\u5230\u7684\u95ee\u9898"},"content":{"rendered":"<p>\u4ee5\u4e0b\u662f\u672c\u6b21\u90e8\u7f72\u9047\u5230\u7684\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/p>\n<p>1\u3001\u95ee\u9898&#xff1a;docker\u4e00\u76f4\u51fa\u73b0\u201c&#061;&#xff1e; ERROR [internal] load metadata for docker.io\/library\/xxx\u201c\u7684\u95ee\u9898<\/p>\n<p>ERROR: failed to solve: openjdk:8-jdk-alpine: failed to resolve source metadata for docker.io\/libran<br \/>\ny\/openidk:8-idk-alpine<br \/>\nfailed commit on ref<br \/>\n&#034;unknown-sha256:607b09fd44f91f3a530d70fa4773273df312ce13139bfcc657f451e73a5d858&#034;; &#034;un<br \/>\nnown-sha256: 607ba9fd44f9lf3a530d70fa4773273df312ce13138bfcc657f45le73a5d858&#034; failed size validation<br \/>\n1364 !&#061; 1199:failed preconditior <\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5&#xff1a;\u56fd\u5185\u5f88\u591a\u955c\u50cf\u6e90\u4e0d\u53ef\u7528\u4e86&#xff0c;\u66f4\u6362\u955c\u50cf\u6e90\u5373\u53efhttps:\/\/zhuanlan.zhihu.com\/p\/32004414428<\/p>\n<p>\u6d4b\u8bd5&#xff1a;docker pull docker.m.daocloud.io\/hello-world<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u51fa\u73b0\u4ee5\u4e0b\u5185\u5bb9\u8868\u793a\u6210\u529f<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&gt;Using default tag: latest<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&gt;latest: Pulling from hello-world<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&gt;e6590344b1a5: Pull complete<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&gt;Digest: sha256:c41088499908a59aae84b0a49c70e86f4731e588a737f1637e73c8c09d995654<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&gt;Status: Downloaded newer image for docker.m.daocloud.io\/hello-world:latest<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&gt;docker.m.daocloud.io\/hello-world:latest<\/p>\n<p>\u6210\u529f\u540e\u5728daemon.json\u4e2d\u6c38\u4e45\u66f4\u6362\u955c\u50cf\u6e90<br \/>\n sudo tee \/etc\/docker\/daemon.json &lt;&lt;-&#039;EOF&#039;<br \/>\n {<br \/>\n &#034;registry-mirrors&#034;: [<br \/>\n     &#034;https:\/\/docker.m.daocloud.io&#034;,<br \/>\n     &#034;https:\/\/docker.imgdb.de&#034;,<br \/>\n     &#034;https:\/\/docker-0.unsee.tech&#034;,<br \/>\n     &#034;https:\/\/docker.hlmirror.com&#034;,<br \/>\n     &#034;https:\/\/docker.1ms.run&#034;,<br \/>\n     &#034;https:\/\/func.ink&#034;,<br \/>\n     &#034;https:\/\/lispy.org&#034;,<br \/>\n     &#034;https:\/\/docker.xiaogenban1993.com&#034;<br \/>\n     ]<br \/>\n } <\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u66f4\u6362\u6210\u529f\u540e\u6d4b\u8bd5 \u00a0<\/p>\n<p>sudo systemctl daemon-reload &amp;&amp; sudo systemctl restart docker<\/p>\n<p>sudo docker pull hello-world <\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6d4b\u8bd5\u6210\u529f\u540e<\/p>\n<p>#\u5220\u9664\u6d4b\u8bd5\u7684helloworld<\/p>\n<p>docker rmi -f \u955c\u50cf\u540d\/\u955c\u50cfID # \u5220\u9664\u4e00\u4e2a\u955c\u50cf<\/p>\n<p>docker rmi -f 74cc54e27dc4 # \u5220\u9664\u4e00\u4e2a\u955c\u50cf(74cc54e27dc4\u662fhello-world\u7684\u955c\u50cfid) <\/p>\n<p>2\u3001\u95ee\u9898&#xff1a;\u90e8\u7f72jar\u5305\u540e\u8fd0\u884cjar\u5305\u4f1a\u51fa\u73b0\u8fdc\u7a0b\u8fde\u63a5\u62a5\u9519ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"134\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250509004054-681d4f168966c.png\" width=\"929\" \/><\/p>\n<p>\u914d\u7f6e\u6587\u4ef6Dockerfile<\/p>\n<p>FROM openjdk:8-jdk-alpine<br \/>\nVOLUME \/tmp<br \/>\n#\u65f6\u533a<br \/>\nRUN echo &#034;Asia\/Shanghai&#034; &gt; \/etc\/timezone<\/p>\n<p>#captcher \u5b57\u4f53\u5305<br \/>\nRUN set -xe \\\\<br \/>\n&amp;&amp; apk &#8211;no-cache add ttf-dejavu fontconfig<\/p>\n<p>COPY *.jar manhour-admin.jar<br \/>\nENTRYPOINT [&#034;java&#034;,&#034;-jar&#034;,&#034;\/manhour-admin.jar&#034;] <\/p>\n<p>#\u6839\u636ejar\u5305\u521b\u5efa\u540e\u53f0docker\u5bb9\u5668<br \/>\ndocker build -t workhoursystem1:v1 \/usr\/local\/workhoursystem1<\/p>\n<p>#\u8fd0\u884c\u7cfb\u7edf\u540e\u53f0<br \/>\ndocker run &#8211;name workhoursystem1 &#8211;restart&#061;always -d -v \/home\/file:\/home\/file -v \/home\/workhoursystem1\/logs:\/home\/manhour-management\/logs -p 8094:8094 workhoursystem1:v1<\/p>\n<p>#\u6253\u5370\u62a5\u9519\u65e5\u5fd7<br \/>\ndocker logs -f  workhoursystem1<\/p>\n<p># \u505c\u6b62<br \/>\n docker stop workhoursystem1<br \/>\ndocker rm 816b5f922496 <\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5&#xff1a;<\/p>\n<p>\u9700\u8981\u505a\u4ee5\u4e0bmysql\u914d\u7f6e<\/p>\n<p>docker exec -it mysql \/bin\/bash<br \/>\nmysql -uroot -p1234<br \/>\nuse mysql;<br \/>\nselect host from user where user &#061;&#039;root&#039;;<br \/>\nupdate user set host &#061;&#039;%&#039; where user &#061;&#039;root&#039;;<br \/>\nFLUSH PRIVILEGES; <\/p>\n<p>3\u3001\u95ee\u9898&#xff1a;\u90e8\u7f72redis<\/p>\n<p> docker pull redis:5.0.14<\/p>\n<p>docker run &#8211;restart&#061;always -p 6380:6380 &#8211;name myredis -v \/home\/redis\/data:\/data -v \/home\/redis\/conf\/redis.conf:\/etc\/redis\/redis.conf -v \/home\/redis\/log:\/var\/log\/redis -d redis:5.0.14 redis-server \/etc\/redis\/redis.conf &#8211;bind 0.0.0.0  &#8211;protected-mode no<br \/>\nredis.conf\u6587\u4ef6<br \/>\n# Redis\u670d\u52a1\u5668\u914d\u7f6e <\/p>\n<p># \u7ed1\u5b9aIP\u5730\u5740<br \/>\n#\u89e3\u9664\u672c\u5730\u9650\u5236 \u6ce8\u91cabind 127.0.0.1<br \/>\nbind 0.0.0.0  <\/p>\n<p>#docker run -itd &#8211;name redis \\\\<br \/>\n#-v \/home\/redis\/conf\/redis.conf:\/home\/redis\/conf\/redis.conf \\\\<br \/>\n#-p 6379:6379 \\\\<br \/>\n#redis:5.0.14 redis-server  \/home\/redis\/conf\/redis.conf  &#8211;appendonly yes<\/p>\n<p># \u670d\u52a1\u5668\u7aef\u53e3\u53f7<br \/>\nport 6380<\/p>\n<p># \u6570\u636e\u5e93\u7d22\u5f15\u6570\u91cf&#xff08;\u9ed8\u8ba4 16&#xff09;<br \/>\ndatabases 16<\/p>\n<p>#\u914d\u7f6e\u5bc6\u7801&#xff0c;\u4e0d\u8981\u53ef\u4ee5\u5220\u6389<br \/>\n#requirepass <\/p>\n<p>#\u8fd9\u4e2a\u914d\u7f6e\u4e0d\u8981\u4f1a\u548cdocker -d \u547d\u4ee4 \u51b2\u7a81<br \/>\n# \u670d\u52a1\u5668\u8fd0\u884c\u6a21\u5f0f&#xff0c;Redis\u4ee5\u5b88\u62a4\u8fdb\u7a0b\u65b9\u5f0f\u8fd0\u884c,\u9ed8\u8ba4\u4e3ano&#xff0c;\u6539\u4e3ayes\u610f\u4e3a\u4ee5\u5b88\u62a4\u8fdb\u7a0b\u65b9\u5f0f\u542f\u52a8&#xff0c;\u53ef\u540e\u53f0\u8fd0\u884c&#xff0c;\u9664\u975ekill\u8fdb\u7a0b&#xff0c;\u6539\u4e3ayes\u4f1a\u4f7f\u914d\u7f6e\u6587\u4ef6\u65b9\u5f0f\u542f\u52a8redis\u5931\u8d25&#xff0c;\u5982\u679c\u540e\u9762redis\u542f\u52a8\u5931\u8d25&#xff0c;\u5c31\u5c06\u8fd9\u4e2a\u6ce8\u91ca\u6389<br \/>\ndaemonize no<\/p>\n<p>protected-mode no<\/p>\n<p>#\u5f53Redis\u4ee5\u5b88\u62a4\u8fdb\u7a0b\u65b9\u5f0f\u8fd0\u884c\u65f6&#xff0c;Redis\u9ed8\u8ba4\u4f1a\u628apid\u5199\u5165\/var\/run\/redis.pid\u6587\u4ef6&#xff0c;\u53ef\u4ee5\u901a\u8fc7pidfile\u6307\u5b9a(\u81ea\u5b9a\u4e49)<br \/>\n#pidfile \/data\/dockerData\/redis\/run\/redis6379.pid  <\/p>\n<p>#\u9ed8\u8ba4\u4e3ano&#xff0c;redis\u6301\u4e45\u5316&#xff0c;\u53ef\u4ee5\u6539\u4e3ayes<br \/>\nappendonly yes<\/p>\n<p>#\u5f53\u5ba2\u6237\u7aef\u95f2\u7f6e\u591a\u957f\u65f6\u95f4\u540e\u5173\u95ed\u8fde\u63a5&#xff0c;\u5982\u679c\u6307\u5b9a\u4e3a0&#xff0c;\u8868\u793a\u5173\u95ed\u8be5\u529f\u80fd<br \/>\ntimeout 10<br \/>\n# \u670d\u52a1\u5668\u7cfb\u7edf\u9ed8\u8ba4\u914d\u7f6e\u53c2\u6570\u5f71\u54cd Redis \u7684\u5e94\u7528<br \/>\nmaxclients 10000<br \/>\ntcp-keepalive 300<\/p>\n<p>#\u6307\u5b9a\u5728\u591a\u957f\u65f6\u95f4\u5185&#xff0c;\u6709\u591a\u5c11\u6b21\u66f4\u65b0\u64cd\u4f5c&#xff0c;\u5c31\u5c06\u6570\u636e\u540c\u6b65\u5230\u6570\u636e\u6587\u4ef6&#xff0c;\u53ef\u4ee5\u591a\u4e2a\u6761\u4ef6\u914d\u5408&#xff08;\u5206\u522b\u8868\u793a900\u79d2&#xff08;15\u5206\u949f&#xff09;\u5185\u67091\u4e2a\u66f4\u6539&#xff0c;300\u79d2&#xff08;5\u5206\u949f&#xff09;\u5185\u670910\u4e2a\u66f4\u6539\u4ee5\u53ca60\u79d2\u5185\u670910000\u4e2a\u66f4\u6539&#xff09;<br \/>\nsave 900 1<br \/>\nsave 300 10<br \/>\nsave 60 10000<\/p>\n<p># \u6309\u9700\u6c42\u8c03\u6574 Redis \u7ebf\u7a0b\u6570<br \/>\ntcp-backlog 511<\/p>\n<p># \u542f\u7528 AOF, AOF\u5e38\u89c4\u914d\u7f6e<br \/>\n#appendonly yes<br \/>\n#appendfsync everysec<br \/>\n#no-appendfsync-on-rewrite no<br \/>\n#auto-aof-rewrite-percentage 100<br \/>\n#auto-aof-rewrite-min-size 64mb<\/p>\n<p># \u6162\u67e5\u8be2\u9608\u503c<br \/>\nslowlog-log-slower-than 10000<br \/>\nslowlog-max-len 128<\/p>\n<p># \u662f\u5426\u8bb0\u5f55\u7cfb\u7edf\u65e5\u5fd7&#xff0c;\u9ed8\u8ba4\u4e3ayes<br \/>\nsyslog-enabled yes  <\/p>\n<p>#\u6307\u5b9a\u65e5\u5fd7\u8bb0\u5f55\u7ea7\u522b&#xff0c;Redis\u603b\u5171\u652f\u6301\u56db\u4e2a\u7ea7\u522b&#xff1a;debug\u3001verbose\u3001notice\u3001warning&#xff0c;\u9ed8\u8ba4\u4e3averbose<br \/>\nloglevel notice<\/p>\n<p># \u65e5\u5fd7\u8f93\u51fa\u6587\u4ef6&#xff0c;\u9ed8\u8ba4\u4e3astdout&#xff0c;\u4e5f\u53ef\u4ee5\u6307\u5b9a\u6587\u4ef6\u8def\u5f84<br \/>\nlogfile stdout<br \/>\n#logfile \/home\/redis\/log<\/p>\n<p># \u65e5\u5fd7\u6587\u4ef6<br \/>\n#logfile \/var\/log\/redis\/redis-server.log<\/p>\n<p># \u7cfb\u7edf\u5185\u5b58\u8c03\u4f18\u53c2\u6570<br \/>\n# \u6309\u9700\u6c42\u8bbe\u7f6e<br \/>\nhash-max-ziplist-entries 512<br \/>\nhash-max-ziplist-value 64<br \/>\nlist-max-ziplist-entries 512<br \/>\nlist-max-ziplist-value 64<br \/>\nset-max-intset-entries 512<br \/>\nzset-max-ziplist-entries 128<br \/>\nzset-max-ziplist-value 64 <\/p>\n<p>redis.conf\u6587\u4ef6\u7684\u8def\u5f84<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"476\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250509004054-681d4f169ade9.png\" width=\"958\" \/><\/p>\n<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4f7f\u7528 curl \u6d4b\u8bd5 TCP \u8fde\u63a5&#xff08;\u7b80\u5355\u63a2\u6d4b&#xff09;\u867d\u7136 curl \u4e3b\u8981\u7528\u4e8e HTTP&#xff0c;\u4f46\u53ef\u4ee5\u901a\u8fc7 telnet \u534f\u8bae\u6a21\u62df TCP \u8fde\u63a5\u5c1d\u8bd5<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0curl -v telnet:\/\/\u670d\u52a1\u5668\u5730\u5740:6380<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&gt;\u6210\u529f\u8fde\u63a5&#xff1a;\u4f1a\u663e\u793a Connected to \u672c\u670d\u52a1\u5668\u5730\u5740\u00a0(\u672c\u670d\u52a1\u5668\u5730\u5740) port 6380\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u9a8c\u8bc1\u00a0Redis\u00a0\u914d\u7f6e\u751f\u6548&#xff1a; docker\u00a0exec\u00a0-it\u00a0myredis\u00a0redis-cli\u00a0config\u00a0get\u00a0bind\u00a0 \u6216\u00a0docker exec -it myredis redis-cli config get bind\u00a0\u00a0 #\u00a0\u5e94\u8fd4\u56de\u00a0&#034;bind\u00a00.0.0.0&#034;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">4\u3001\u95ee\u9898&#xff1a;\u5982\u679c\u90e8\u7f72\u4e0aredis\u4e4b\u540e&#xff0c;\u8fd8\u662f\u663e\u793a\u8fde\u63a5\u672c\u5730\u7684redis\u7aef\u53e3<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u89e3\u51b3\u65b9\u6cd5&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8fd9\u6b21\u662f\u56e0\u4e3a\u66f4\u6539\u4e86jar\u5305&#xff0c;\u4f46\u6ca1\u6709\u91cd\u65b0bulid&#xff0c;\u91cd\u65b0\u8d70\u4e00\u904d\u8fd9\u4e2a\u6b65\u9aa4\u5c31\u53ef\u4ee5\u4e86<\/p>\n<p>\u5931\u8d25&#xff1a;\u663e\u793a Failed to connect \u6216\u8d85\u65f6\u3002<\/p>\n<p>#\u5220\u9664<br \/>\ndocker stop workhoursystem1<br \/>\ndocker rm  workhoursystem1<br \/>\n#build<br \/>\ndocker build -t workhoursystem1:v1 \/usr\/local\/workhoursystem1<br \/>\n#\u8fd0\u884cjava\u9879\u76ee<br \/>\ndocker run &#8211;name workhoursystem1 &#8211;restart&#061;always -d -v \/home\/file:\/home\/file -v \/home\/workhoursystem1\/logs:\/home\/manhour-management\/logs -p 8094:8094 workhoursystem1:v1<br \/>\n#\u6253\u5370<br \/>\ndocker logs -f  workhoursystem1 <\/p>\n<p>5\u3001\u95ee\u9898&#xff1a;\u524d\u7aef\u82e5\u4f9d\u90e8\u7f72\u4e4b\u540e&#xff0c;\u663e\u793a\u8bf7\u6c42\u540e\u7aef\u63a5\u53e3\u6709\u95ee\u9898<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5&#xff1a;\u9700\u8981\u5728nginx\u91cc\u9762\u52a0\u4e0a\u8fd9\u4e2a\u914d\u7f6e<\/p>\n<p>location \/prod-api\/{<br \/>\nproxy_set_header Host $http_host;<br \/>\nproxy_set_header X-Real-IP $remote_addr;<br \/>\nproxy_set_header REMOTE-HOST $remote_addr;<br \/>\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>\nproxy_pass http:\/\/localhost:8094\/zgzcwy\/;\/\/\u670d\u52a1\u5668\u5730\u5740&#043;jar\u5305\u7aef\u53e3\u53f7<br \/>\n} <\/p>\n<p>\u5b8c\u6574\u7248nginx<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"294\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250509004054-681d4f16bd1be.png\" width=\"655\" \/><\/p>\n<p>\u5728nginx.conf<\/p>\n<p># user  nginx;<br \/>\nworker_processes  4;<\/p>\n<p>error_log  \/var\/log\/nginx\/error.log notice;<br \/>\npid        \/var\/run\/nginx.pid;<\/p>\n<p>events {<br \/>\n    worker_connections  1024;<br \/>\n}<\/p>\n<p>http {<br \/>\n    include       \/etc\/nginx\/mime.types;<br \/>\n    default_type  application\/octet-stream;<\/p>\n<p>    log_format  main  &#039;$remote_addr &#8211; $remote_user [$time_local] &#034;$request&#034; &#039;<br \/>\n                      &#039;$status $body_bytes_sent &#034;$http_referer&#034; &#039;<br \/>\n                      &#039;&#034;$http_user_agent&#034; &#034;$http_x_forwarded_for&#034;&#039;;<\/p>\n<p>    access_log  \/var\/log\/nginx\/access.log  main;<\/p>\n<p>    sendfile        on;<br \/>\n    #tcp_nopush     on;<\/p>\n<p>    keepalive_timeout  65;<\/p>\n<p>    gzip  on;# \u5f00\u542fgzip<br \/>\n    gzip_buffers 4 16k;# \u8bbe\u7f6e\u7f13\u51b2\u533a\u5927\u5c0f<br \/>\n    gzip_comp_level 6;#\u538b\u7f29\u7ea7\u522b\u5b98\u7f51\u5efa\u8bae\u662f6&#xff0c;\u538b\u7f29\u7ea7\u522b(\u7ea7\u522b\u8d8a\u9ad8,\u538b\u7684\u8d8a\u5c0f,\u8d8a\u6d6a\u8d39CPU\u8ba1\u7b97\u8d44\u6e90)<br \/>\n    gzip_min_length 100;#\u5141\u8bb8\u88ab\u538b\u7f29\u7684\u9875\u9762\u6700\u5c0f\u5b57\u8282\u6570<br \/>\n    gzip_types text\/plain application\/javascript text\/css application\/xml text\/javascript application\/x-httpd-php image\/png;#\u538b\u7f29\u7684\u7c7b\u578b<br \/>\n    gzip_disable &#034;MSIE [1-6]\\\\.&#034;;#\u914d\u7f6e\u7981\u7528gzip\u6761\u4ef6&#xff0c;\u652f\u6301\u6b63\u5219\u3002\u6b64\u5904\u8868\u793aie6\u53ca\u4ee5\u4e0b\u4e0d\u542f\u7528gzip&#xff08;\u56e0\u4e3aie\u4f4e\u7248\u672c\u4e0d\u652f\u6301&#xff09;<br \/>\n    gzip_vary on;#\u662f\u5426\u4f20\u8f93gzip\u6807\u8bc6<br \/>\n    gzip_http_version 1.1;# \u4f7f\u7528 GZIP \u538b\u7f29\u7684\u6700\u5c0f HTTP \u7248\u672c<\/p>\n<p>    #gzip  on;<\/p>\n<p>    include \/etc\/nginx\/conf.d\/*.conf;<br \/>\n}<\/p>\n<p>\u5728\u672c\u9879\u76ee\u7684nginx\u91cc\u9762\u52a0\u4e0a\u4ee5\u4e0b\u914d\u7f6e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"326\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250509004054-681d4f16cd39f.png\" width=\"902\" \/><\/p>\n<\/p>\n<p>server {<br \/>\n    listen       8003;<br \/>\n    listen  [::]:8003;<br \/>\n    server_name  localhost;<\/p>\n<p>    #access_log  \/var\/log\/nginx\/host.access.log  main;<\/p>\n<p>    location \/ {<br \/>\n        root   \/usr\/local\/workhoursystem1web\/dist;<br \/>\n        index  index.html index.htm;<\/p>\n<p>   # \u8fd9\u4e2a\u975e\u5e38\u91cd\u8981&#xff0c;\u91c7\u7528vue-router\u7684\u65f6\u5019&#xff0c;\u5fc5\u987b\u914d\u7f6e\u8fd9\u4e2a<br \/>\n        try_files $uri $uri\/ \/index.html;<br \/>\n    }<\/p>\n<p>location \/prod-api\/{<br \/>\nproxy_set_header Host $http_host;<br \/>\nproxy_set_header X-Real-IP $remote_addr;<br \/>\nproxy_set_header REMOTE-HOST $remote_addr;<br \/>\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>\nproxy_pass http:\/\/localhost:8094\/zgzcwy\/;\/\/\u670d\u52a1\u5668\u5730\u5740&#043;jar\u5305\u7aef\u53e3<br \/>\n}<\/p>\n<p>    #error_page  404              \/404.html;<\/p>\n<p>    # redirect server error pages to the static page \/50x.html<br \/>\n    #<br \/>\n    error_page   500 502 503 504  \/50x.html;<br \/>\n    location &#061; \/50x.html {<br \/>\n        root   \/usr\/share\/nginx\/html;<br \/>\n    }<br \/>\n#    location \/dev-api\/{<br \/>\n#proxy_set_header Host $http_host;<br \/>\n#proxy_set_header X-Real-IP $remote_addr;<br \/>\n#proxy_set_header REMOTE-HOST $remote_addr;<br \/>\n#proxy_set_header X-Forwarded-For &amp;proxy_add_x_forwarded_for;<br \/>\n#proxy_pass http:\/\/localhost\/zgzcwy;<br \/>\n##http:\/\/localhost:9000\/;<br \/>\n#}<br \/>\n#location \/prod-api\/{<br \/>\n#proxy_set_header Host $http_host;<br \/>\n#proxy_set_header X-Real-IP $remote_addr;<br \/>\n#proxy_set_header REMOTE-HOST $remote_addr;<br \/>\n#proxy_set_header X-Forwarded-For &amp;proxy_add_x_forwarded_for;<br \/>\n#proxy_pass http:\/\/localhost:8094\/zgzcwy;<br \/>\n##http:\/\/localhost:9000\/;<br \/>\n#}<\/p>\n<p>    # proxy the PHP scripts to Apache listening on 127.0.0.1:80<br \/>\n    #<br \/>\n    #location ~ \\\\.php$ {<br \/>\n    #    proxy_pass   http:\/\/127.0.0.1;<br \/>\n    #}<\/p>\n<p>    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<br \/>\n    #<br \/>\n    #location ~ \\\\.php$ {<br \/>\n    #    root           html;<br \/>\n    #    fastcgi_pass   127.0.0.1:9000;<br \/>\n    #    fastcgi_index  index.php;<br \/>\n    #    fastcgi_param  SCRIPT_FILENAME  \/scripts$fastcgi_script_name;<br \/>\n    #    include        fastcgi_params;<br \/>\n    #}<\/p>\n<p>    # deny access to .htaccess files, if Apache&#039;s document root<br \/>\n    # concurs with nginx&#039;s one<br \/>\n    #<br \/>\n    #location ~ \/\\\\.ht {<br \/>\n    #    deny  all;<br \/>\n    #}<br \/>\n} <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u672c\u6b21\u670d\u52a1\u5668\u90e8\u7f72\u82e5\u4f9d\u9879\u76ee\u9047\u5230\u7684\u95ee\u9898&#xff01;&#xff01;&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb653\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf3\u6b21\u30022\u3001\u95ee\u9898\uff1a\u90e8\u7f72jar\u5305\u540e\u8fd0\u884cjar\u5305\u4f1a\u51fa\u73b0\u8fdc\u7a0b\u8fde\u63a5\u62a5\u9519ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server\u30021\u3001\u95ee\u9898\uff1adocker\u4e00\u76f4\u51fa\u73b0\u201c=\uff1e ERROR [internal] load metadata for docker.io\/library\/xxx\u201c\u7684\u95ee\u9898\u3002\u89e3\u51b3\u65b9\u6cd5\uff1a\u56fd\u5185\u5f88\u591a\u955c\u50cf\u6e90\u4e0d\u53ef\u7528\u4e86\uff0c\u66f4\u6362\u955c\u50cf\u6e90\u5373\u53efhttps:\/\/zhuanlan.zhihu.com\/p\/32004414428\u3002_\u82e5\u4f9d docker \u5e38\u89c1\u95ee\u9898<\/p>\n","protected":false},"author":2,"featured_media":36298,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,44],"topic":[],"class_list":["post-36302","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u90e8\u7f72\u82e5\u4f9d\u9879\u76ee\u5230\u670d\u52a1\u5668\u9047\u5230\u7684\u95ee\u9898 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/36302.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u90e8\u7f72\u82e5\u4f9d\u9879\u76ee\u5230\u670d\u52a1\u5668\u9047\u5230\u7684\u95ee\u9898 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb653\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf3\u6b21\u30022\u3001\u95ee\u9898\uff1a\u90e8\u7f72jar\u5305\u540e\u8fd0\u884cjar\u5305\u4f1a\u51fa\u73b0\u8fdc\u7a0b\u8fde\u63a5\u62a5\u9519ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server\u30021\u3001\u95ee\u9898\uff1adocker\u4e00\u76f4\u51fa\u73b0\u201c=\uff1e ERROR [internal] load metadata for docker.io\/library\/xxx\u201c\u7684\u95ee\u9898\u3002\u89e3\u51b3\u65b9\u6cd5\uff1a\u56fd\u5185\u5f88\u591a\u955c\u50cf\u6e90\u4e0d\u53ef\u7528\u4e86\uff0c\u66f4\u6362\u955c\u50cf\u6e90\u5373\u53efhttps:\/\/zhuanlan.zhihu.com\/p\/32004414428\u3002_\u82e5\u4f9d docker \u5e38\u89c1\u95ee\u9898\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/36302.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-09T00:40:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250509004054-681d4f168966c.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/36302.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/36302.html\",\"name\":\"\u90e8\u7f72\u82e5\u4f9d\u9879\u76ee\u5230\u670d\u52a1\u5668\u9047\u5230\u7684\u95ee\u9898 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-09T00:40:55+00:00\",\"dateModified\":\"2025-05-09T00:40:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/36302.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/36302.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/36302.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u90e8\u7f72\u82e5\u4f9d\u9879\u76ee\u5230\u670d\u52a1\u5668\u9047\u5230\u7684\u95ee\u9898\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u90e8\u7f72\u82e5\u4f9d\u9879\u76ee\u5230\u670d\u52a1\u5668\u9047\u5230\u7684\u95ee\u9898 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/36302.html","og_locale":"zh_CN","og_type":"article","og_title":"\u90e8\u7f72\u82e5\u4f9d\u9879\u76ee\u5230\u670d\u52a1\u5668\u9047\u5230\u7684\u95ee\u9898 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb653\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf3\u6b21\u30022\u3001\u95ee\u9898\uff1a\u90e8\u7f72jar\u5305\u540e\u8fd0\u884cjar\u5305\u4f1a\u51fa\u73b0\u8fdc\u7a0b\u8fde\u63a5\u62a5\u9519ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server\u30021\u3001\u95ee\u9898\uff1adocker\u4e00\u76f4\u51fa\u73b0\u201c=\uff1e ERROR [internal] load metadata for docker.io\/library\/xxx\u201c\u7684\u95ee\u9898\u3002\u89e3\u51b3\u65b9\u6cd5\uff1a\u56fd\u5185\u5f88\u591a\u955c\u50cf\u6e90\u4e0d\u53ef\u7528\u4e86\uff0c\u66f4\u6362\u955c\u50cf\u6e90\u5373\u53efhttps:\/\/zhuanlan.zhihu.com\/p\/32004414428\u3002_\u82e5\u4f9d docker \u5e38\u89c1\u95ee\u9898","og_url":"https:\/\/www.wsisp.com\/helps\/36302.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-09T00:40:55+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250509004054-681d4f168966c.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/36302.html","url":"https:\/\/www.wsisp.com\/helps\/36302.html","name":"\u90e8\u7f72\u82e5\u4f9d\u9879\u76ee\u5230\u670d\u52a1\u5668\u9047\u5230\u7684\u95ee\u9898 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-09T00:40:55+00:00","dateModified":"2025-05-09T00:40:55+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/36302.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/36302.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/36302.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u90e8\u7f72\u82e5\u4f9d\u9879\u76ee\u5230\u670d\u52a1\u5668\u9047\u5230\u7684\u95ee\u9898"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/36302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=36302"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/36302\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/36298"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=36302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=36302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=36302"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=36302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}