授予php-fpm容器在docker-compose中写入文件的权限

如何授权php-fpm容器将文件写入目录?</ p>
\ n

docker-compose.yml文件:</ p>

  version:'3'
services:
web:
image:nginx:latest
ports:
  • “8080:80” 卷:
  • ./code:/code
  • ./site.conf:/etc/nginx/conf.d/default.conf
  • ./logs:/var/ log / nginx restart:always depends_on:
  • php php: image:bitnami / php-fpm:7.1 卷:
  • ./custom.ini:/opt/bitnami/php /etc/conf.d/custom.ini
  • ./code:/code db: image:postgres:10.1 restart:always environment:
  • POSTGRES_DB = $ {DB_NAME}
  • POSTGRES_USER = $ {DB_USER}
  • POSTGRES_PASSWORD = $ {DB_PASSWORD} ports:
  • 5400:5432
    </ code> </ pre>

    当docker-compose启动时我 尝试运行我的代码,但我得到一个错误,说php没有写文件的权限:</ p>

      PHP消息:PHP警告:mkdir():权限被拒绝 在第624行的/code/vendor/yiisoft/yii2/helpers/BaseFileHelper.php中,在读取上游时,客户端:10.0.2.2,服务器:,请求:“GET / HTTP / $ 
    2018 / 11/24 09:35:  25 [错误] 6#6:* 2 stderr发送的FastCGI:“PHP消息:处理另一个错误时发生错误:
    yii \ base \ InvalidConfigException:Web进程无法写入目录:/ code / assets / runtime 在/code/vendor/yiisoft/yii2/web/AssetManager.php:215
    

    </ div>

展开原文

原文

How can i give permission to php-fpm container to write files to a directory?

docker-compose.yml file :

version: '3'
services:
  web:
    image: nginx:latest
    ports:
      - "8080:80"
    volumes:
      - ./code:/code
      - ./site.conf:/etc/nginx/conf.d/default.conf
      - ./logs:/var/log/nginx
    restart: always
    depends_on:
      - php
  php:
    image: bitnami/php-fpm:7.1
    volumes:
      - ./custom.ini:/opt/bitnami/php/etc/conf.d/custom.ini
      - ./code:/code
  db:
    image: postgres:10.1
    restart: always
    environment:
      - POSTGRES_DB=${DB_NAME}
      - POSTGRES_USER=${DB_USER}
      - POSTGRES_PASSWORD=${DB_PASSWORD}
    ports:
      - 5400:5432

When docker-compose is up I try to run my code but I get an error that says php doesn't have permission to write files:

PHP message: PHP Warning:  mkdir(): Permission denied in /code/vendor/yiisoft/yii2/helpers/BaseFileHelper.php on line 624" while reading upstream, client: 10.0.2.2, server: , request: "GET / HTTP/$
2018/11/24 09:35:25 [error] 6#6: *2 FastCGI sent in stderr: "PHP message: An Error occurred while handling another error:
yii\base\InvalidConfigException: The directory is not writable by the Web process: /code/assets/runtime in /code/vendor/yiisoft/yii2/web/AssetManager.php:215

douhu1990
douhu1990 为什么你在nginx服务中安装了代码?将它安装在php容器中应该可以解决问题。
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
如何在docker容器中重新加载服务配置(php-fpm)?

<div class="post-text" itemprop="text"> <p>I need to run php-fpm with root user.</p> <p>I'm following steps on this page <a href="https://serverfault.com/a/789039/479680">Start PHP-FPM with root option automatically</a> but it looks like systemd and systemctl are not inluded in my baseimage ubuntu:16.04 then I can't reload service configuration.</p> <p>Then how to proceed else ? Today, i'm installing apache/php-fpm in the same container.</p> <p>Thanks in advance.</p> <p>Dockerfile :</p> <p></p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>FROM ubuntu:16.04 # Installer Nano / Apache2 RUN apt-get update &amp;&amp; apt-get install -y \ apt-utils \ nano \ apache2 # Activer le module Apache mod_proxy_fcgi RUN a2enmod proxy_fcgi # Activer le module Apache mod_rewrite RUN a2enmod rewrite # Installation PHP + extensions / composer RUN apt-get install -y \ php-fpm \ php-mcrypt \ php-mysql \ php-apcu \ php-curl \ php-intl \ php-xdebug \ php-xml \ php-zip \ php-bcmath \ php-gd \ php-json \ php-ldap \ php-mbstring \ php-mysql \ php-pgsql \ php-sqlite3 \ php-xml \ php-xsl \ php-zip \ php-soap \ php-opcache \ composer # Creation dossier php pour pid/socket php-fpm RUN mkdir /run/php # Activer config RUN a2enconf php7.0-fpm EXPOSE 80 VOLUME /var/www/html WORKDIR /var/www/html # Clean up APT when done. RUN apt-get clean</code></pre> </div> </div> <p>My docker-compose file :</p> <p></p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>version: '2' services: apachephp: container_name: monserveur image: toto/apache2_php-fpm7.0.30:0.4 ports: - "80:80" volumes: - D:\projets\lab.magento225:/var/www/html links: - db:db tty: true db: container_name: mabdd image: mysql:5.6 ports: - "3306:3306" volumes: - D:\local.databases\lab.magento225:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=root pma: container_name: phpmyadmin image: phpmyadmin/phpmyadmin ports: - "8080:80" links: - db:db</code></pre> </div> </div> </div>

LAMP-Stack with Docker:如何修改httpd.conf以访问PHP-FPM?

<div class="post-text" itemprop="text"> <p>I have some trouble to get access from my apache container to Php-fpm. My docker-compose file is ready and works fine. But I don't know how to modify the httpd.conf in order to establish communication between both containers (Apache and Php-fpm). I have looked for some useful tutorials on the internet, but everyone uses Nginx instead of Apache2. There is also a preconfigured Docker image consisting of a Apache webserver and Php-fpm on Docker Hub, but I prefer two seperated images, because of replaceability.</p> <p>Here is my docker-compose file:</p> <pre><code>version: "3.5" services: webserver: build: apache/ ports: - "8080:80" - "443:443" volumes: - ~/Docker-Images/example/apache/html:/usr/local/apache2/htdocs links: - php-fpm php-fpm: build: php-fpm/ ports: - "9000:9000" links: - database database: build: mysql/ ports: - "3306:3306" volumes: - ~/Docker-Images/example/mysql/init-scripts:/init-scripts volumes: webserver: database: </code></pre> <p>If you need my httpd.conf, let me know! I haven't added it, because it is a very long file with only default values.</p> </div>

Docker无法使用php-fpm容器链接nginx容器

<div class="post-text" itemprop="text"> <p>Hello for my work I am doing a nginx server and php fpm server with docker, but I do not know how to link nginx and php with fast cgi </p> <p>Nginx - Docker file</p> <pre><code>FROM debian:jessie MAINTAINER Thomas Vidal &lt;thomas-vidal@hotmail.com&gt; RUN apt-get update &amp;&amp; apt-get upgrade RUN apt-get install -y wget RUN wget http://nginx.org/keys/nginx_signing.key &amp;&amp; apt-key add nginx_signing.key RUN apt-get update &amp;&amp; apt-get install -y nginx RUN echo " daemon off;" &gt;&gt; /etc/nginx/nginx.conf RUN ln -sf /etc/nginx/conf.d /site-conf RUN ln -sf /var/www/html /www VOLUME ["/site-conf", "/www"] EXPOSE 80 443 CMD nginx </code></pre> <p>Nginx - default.conf </p> <pre><code>server { listen 80; index index.php index.html; server_name 192.168.99.100; root /www; error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log; location ~ \.php$ { try_files $uri =404; fastcgi_pass 192.168.99.100:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } </code></pre> <p>Nginx - index.php</p> <pre><code>&lt;?php phpinfo(); ?&gt; </code></pre> <p>Php-fpm - Dockerfile</p> <pre><code>FROM debian:jessie MAINTAINER Thomas Vidal &lt;thomas-vidal@hotmail.com&gt; RUN apt-get update &amp;&amp; apt-get upgrade RUN apt-get install -y php5-fpm php5-cli php5-mysql php5-curl php5-mcrypt php5-gd php5-redis RUN sed -e 's#;daemonize = yes#daemonize = no#' -i /etc/php5/fpm/php-fpm.conf RUN sed -e 's#listen = /var/run/php5-fpm.sock#listen = [::]:9000#g' -i /etc/php5/fpm/pool.d/www.conf EXPOSE 9000 CMD php5-fpm </code></pre> <p>What is being returned:</p> <blockquote> <p>File not found.</p> </blockquote> <p>Thanks for your help!</p> </div>

在一个dockerfile中结合PHP-fpm和nginx

我需要将php-fpm与nginx结合在一个dockerfile中进行生产部署。 所以更好的方法是: (1)使用php:7.1.8-fpm启动dockerfile,然后在其之上安装nginx映像层? (2)还是建议使用Nginx映像,然后使用apt-get安装php-fpm? PS:我没有用于生产部署的docker-compose构建选项。 在我的开发环境中,我已经使用docker-compose并从两个映像轻松构建多容器应用程序。 我们的组织开发人员不支持针对产品环境的基于docker-compose的部署。

如何在opcache中启用优化(在官方的php-fpm docker镜像中)

<div class="post-text" itemprop="text"> <p>The container is built from a trivial Dockerfile:</p> <pre><code>FROM php:7.2.19-fpm RUN docker-php-ext-configure opcache --enable-opcache \ &amp;&amp; docker-php-ext-install opcache </code></pre> <p>I did not change php.ini, so all the settings are default.</p> <p>What's unexpected is that now phpinfo shows (the excerpt):</p> <pre><code>Opcode Caching Up and Running Optimization Disabled SHM Cache Enabled File Cache Disabled opcache.enable On On opcache.optimization_level 0 0x7FFFBFFF </code></pre> <p>The question: what else do I need to do to have optimisations enabled?</p> </div>

Docker撰写:Nginx和PHP-FPM无法正常工作

<div class="post-text" itemprop="text"> <p>I'm testing docker compose with Nginx and php-fpm, but this fail. My docker-compose.yml:</p> <pre><code>version: '2' services: nginx: container_name: nginx build: context: ./dockerfiles/nginx/ dockerfile: Dockerfile volumes: - ./project/:/usr/share/nginx/html/ ports: - "8000:80" links: - php php: container_name: php-fpm image: php:7-fpm volumes: - ./project/:/var/www/html/ ports: - "9000:9000" </code></pre> <p>This is my dockerfile Nginx:</p> <pre><code>FROM nginx:latest COPY config/default.conf /etc/nginx/conf.d/ </code></pre> <p>And dafault.conf file:</p> <pre><code>server { listen 80; server_name localhost; root /usr/share/nginx/html; location / { try_files $uri /index.php$is_args$args; } location ~ ^/.+\.php(/|$) { fastcgi_pass php:9000; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } </code></pre> <p>when I try localhost: 8000 returns the following message:</p> <p>"File not found."</p> <p>but, the index.php is in the project/ path.</p> <p>that I am wrong?</p> </div>

Docker nginx + php-fpm配置主机?

<div class="post-text" itemprop="text"> <p>I am trying to set up a work environment for myself. I can’t get to the server through the name specified in hosts file.</p> <p>docker-compose.yml:</p> <pre><code>version: '2' services: nginx: image: nginx:latest ports: - "80:80" - "443:443" volumes: - ./hosts:/etc/nginx/conf.d - ./www:/var/www - ./logs:/var/log/nginx links: - php php: build: ./images/php links: - mysql volumes: - ./www:/var/www mysql: image: mysql:8 ports: - "3306:3306" volumes: - ./mysql:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: secret </code></pre> <p>php dockerfile:</p> <pre><code>FROM php:7.1-fpm RUN apt-get update &amp;&amp; apt-get install -y \ curl \ wget \ git \ libfreetype6-dev \ libjpeg62-turbo-dev \ libmcrypt-dev \ libpng-dev \ &amp;&amp; docker-php-ext-install -j$(nproc) iconv mcrypt mbstring mysqli pdo_mysql zip \ &amp;&amp; docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ &amp;&amp; docker-php-ext-install -j$(nproc) gd RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD php.ini /usr/local/etc/php/conf.d/40-custom.ini WORKDIR /var/www CMD ["php-fpm"] </code></pre> <p>./hosts/hello-dev.conf:</p> <pre><code>server { server_name hello.dev; listen 80; index index.php; set $MAGE_ROOT /var/www/hello.dev; error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log; root $MAGE_ROOT; location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } } </code></pre> <p>hosts: <code>127.0.0.1 hello.dev</code></p> <p>Tell me what you can try to do in this situation? If I go to the address <a href="http://127.0.0.1" rel="nofollow noreferrer">http://127.0.0.1</a> it opens the site, but I need to be able to create several configs with different names.</p> </div>

Nginx + PHP-FPM:连接到上游时拒绝连接(502)

<div class="post-text" itemprop="text"> <p>I know there's a ton of posts regarding 502 Bad Gateway, but I haven't been able to solve this problem. I'm using Docker Compose to create separate containers for Nginx and PHP-FPM. </p> <p>Error I get loading PHP files in the browser (HTML files render fine):</p> <pre><code>tc-web | 2018/01/22 19:22:46 [error] 5#5: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 172.18.0.1, server: localhost, request: "GET /info.php HTTP/1.1", upstream: "fastcgi://172.18.0.2:9000", host: "localhost:8080" tc-web | 172.18.0.1 - - [22/Jan/2018:19:22:46 +0000] "GET /info.php HTTP/1.1" 502 575 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" </code></pre> <p>I've tried tweaking the various configs, using Unix socket, etc., for hours, and I still get 502 errors with PHP files. Can you spot what's wrong?</p> <p>Here are all required files..</p> <p><strong>docker-composer.yml:</strong></p> <pre><code>version: '3' services: web: build: context: ./docker/nginx image: tc-web:0.1.0 container_name: tc-web volumes: # test files - ./temp.html:/var/www/html/index.html - ./temp.php:/var/www/html/info.php ports: - 8080:80 depends_on: - php-fpm php-fpm: build: context: ./docker/php-fpm image: tc-php:0.1.0 container_name: tc-php volumes: - ./temp.html:/var/www/html/index.html - ./temp.php:/var/www/html/info.php </code></pre> <p><strong>docker/nginx/Dockerfile:</strong></p> <pre><code>FROM nginx:1.13.8 # Install programs RUN apt-get update RUN apt-get install -y nano &amp;&amp; \ apt-get install -y git &amp;&amp; \ apt-get install -y procps RUN mkdir -p /var/www/html COPY nginx.conf /etc/nginx/nginx.conf COPY default.conf /etc/nginx/conf.d/default.conf </code></pre> <p><strong>docker/nginx/nginx.conf:</strong></p> <pre><code>user www-data; worker_processes 1; # error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/default.conf; } </code></pre> <p><strong>docker/nginx/default.conf:</strong></p> <pre><code>server { listen 80; server_name localhost; root /var/www/html; location / { try_files $uri $uri/ /index.php?$query_string; } location ~* \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php-fpm:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } </code></pre> <p><strong>docker/php-fpm/Dockerfile:</strong></p> <pre><code>FROM php:7.0-fpm # Install programs RUN apt-get update RUN apt-get install -y nano &amp;&amp; \ apt-get install -y procps RUN mkdir -p /var/www/html COPY php-fpm.conf /usr/local/etc/php-fpm.conf COPY www.conf /usr/local/etc/php-fpm.d/www.conf </code></pre> <p><strong>docker/php-fpm/php-fpm.conf:</strong></p> <pre><code>[global] include=etc/php-fpm.d/www.conf </code></pre> <p><strong>docker/php-fpm/www.conf:</strong></p> <pre><code>[global] ;daemonize = no ; if we send this to /proc/self/fd/1, it never appears error_log = /proc/self/fd/2 [www] user = www-data group = www-data listen = 127.0.0.1:9000 ;listen = /var/run/php-fpm/php7-fpm.sock ;listen.owner = www-data ;listen.group = www-data ;listen.mode = 0660 access.log = /proc/self/fd/2 pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 ; Ensure worker stdout and stderr are sent to the main error log. catch_workers_output = yes </code></pre> </div>

Docker - Nginx + PHP-FPM =达到超时

<div class="post-text" itemprop="text"> <p>Simple question: I'm getting <code>Maximum execution time of 0 seconds exceeded</code>, but I don't know why: there are a lot of things written about it, but in script I've no set_timeout or anything like that, just in PHP-FPM config I've <code>php_value[max_execution_time] = 0</code> and even with this I'm gettting timeout from PHP-FPM's side (nginx is OK, no 504 Gateway Timeout or what's throwing). The thing is long running http request being killed in aprox. 3 mins. Setup is standard nginx + php-fpm (7.2) running in docker.</p> <p>Thanks for any points!</p> </div>

如何在docker image richarvey / nginx-php-fpm上安装php56-pecl-imagick

<div class="post-text" itemprop="text"> <p>I am trying to get Imagick installed on this docker image: richarvey/nginx-php-fpm:php5</p> <p>I am trying to debug some issues, hence the old version.</p> <p>Normally on Redhat i'll run the yum cmd to execute:</p> <pre><code>sudo yum install -y php56-pecl-imagick </code></pre> <p>Here's the original repo for that install. <a href="https://github.com/richarvey/nginx-php-fpm" rel="nofollow noreferrer">https://github.com/richarvey/nginx-php-fpm</a></p> </div>

使用nginx,PHP-fpm很慢,

<div class="post-text" itemprop="text"> <p>So, I have been running some benchmarks on my docker container (nginx connecting to php-fpm) and it's over 70 x slower than bare metal. I can manage 100 requests a second compared to bare metal which is 7,000 a second.</p> <p>docker-compose.yml:</p> <pre><code>version: '3' services: #web frontend: build: context: ./environment/nginx dockerfile: ./Dockerfile container_name: nginx_software restart: always ports: - 80:80 volumes: - ./environment/nginx/nginx.conf:/etc/nginx/nginx.conf links: - php php: build: context: ./environment/php args: version: 7.3-fpm dockerfile: ./Dockerfile container_name: php_software restart: always ports: - 9000:9000 volumes: - ./api:/var/www/software:cached links: - mysql mysql: build: context: ./environment/mysql args: version: 5.7 dockerfile: ./Dockerfile container_name: mysql_software command: --default-authentication-plugin=mysql_native_password restart: always ports: - 3306:3306 volumes: - ./environment/mysql/data:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: software MYSQL_DATABASE: software MYSQL_USER: software MYSQL_PASSWORD: software </code></pre> <p>My nginx.conf</p> <pre><code>user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { } http { include /etc/nginx/mime.types; server { listen 80; listen [::]:80; server_name software.test; root /usr/share/nginx/html/software; add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; #add_header X-Content-Type-Options "nosniff"; index index.html; location / { try_files $uri $uri/ =404; } charset utf-8; } server { listen 80; listen [::]:80; server_name api.software.test; root /var/www/software/public; add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; #add_header X-Content-Type-Options "nosniff"; index index.php; charset utf-8; location / { try_files $uri $uri/ /index.php?$query_string; } error_page 404 /index.php; location ~ \.php$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_pass php:9000; fastcgi_index index.php; } location ~ /\.(?!well-known).* { deny all; } } } </code></pre> <p>My dockerfile for nginx, just copies the conf file to the /etc/nginx folder. </p> <p>if I build a custom fpm file, or use the following one: <a href="https://github.com/uvd/php-docker-bench" rel="nofollow noreferrer">https://github.com/uvd/php-docker-bench</a> I get the correct amount of RPS (7,000) but with my current nginx/fpm setup, I barely surpass 100 RPS. What am I doing wrong, any ideas?</p> </div>

【php-fpm的安装】源码安装php-fpm,最后找不到php-fpm文件

配置make时写明产生php-fpm 但是make all install之后,发现在/usr/local/php/etc/下没有php-fpm.conf.default文件,而且也没有/usr/local/php/sbin/php-fpm,请问该如何处理,在线等,急,谢谢

在php7-fpm Docker容器中安装postgre驱动程序

<div class="post-text" itemprop="text"> <p>I've installed <code>PHP:latest</code> Docker container using the docker-compose command. It installed <code>php-7.1.6-fpm</code> in my Docker. When I tried to install <code>php7-pgsql</code> extension it failed to find that package, instead found <code>pdo</code> and <code>pdo_pgsql</code> packages. That will not satisfy my need. When I search for the available packages in the installed PHP container, I could not find any related pgsql packages for <code>php7</code>, instead, I saw <code>php5-pgsql</code> package, that will not work with php7-fpm. </p> <p>Finally, I installed php-5.6-fpm container after removing the old one targeting to use <code>php5-pgsql</code> package. But now I disappointed again that I could not find <code>php5-pgsql</code> package in the newly installed container. </p> <p>I know I'll be missing some important points. Whether Alpine Linux does not have <code>php-pgsql</code> extension. What are the possible ways to include this extension in my PHP container. I've also included Nginx and Postgres in my docker-compose.yml</p> <p>I've only 3-day theory knowledge in Docker and first-day practical experience.</p> <p>Thanks for reading.</p> </div>

带有dockerized PHP-FPM的502 Bad Gateway

<div class="post-text" itemprop="text"> <p>I'm trying to replace my PHP-FPM installation with a docker container. I can build a container and start the FPM service (127.0.0.1:9000). </p> <p>However, I get a Bad Gateway (502) error when I enter the connection in nginx. What could be the reason?</p> <p><strong>Dockerfile</strong></p> <pre><code>FROM alpine:latest RUN apk --update --no-cache add \ php7 \ php7-bcmath \ php7-dom \ php7-ctype \ php7-simplexml \ php7-session \ php7-soap \ php7-tokenizer \ php7-xml \ php7-xmlreader \ php7-xmlwriter \ php7-zip \ &amp;&amp; rm -rf /var/cache/apk/* #COPY php.ini /etc/php7/conf.d/50-setting.ini COPY php-fpm.conf /etc/php7/php-fpm.conf EXPOSE 9000 CMD ["php-fpm7", "-F"] </code></pre> <p><strong>php-fpm.conf</strong></p> <pre><code>[global] error_log = /dev/stderr [default] listen = 127.0.0.1:9000 pm = dynamic pm.max_children = 10 pm.start_servers = 3 pm.min_spare_servers = 2 pm.max_spare_servers = 4 pm.max_requests = 400 </code></pre> <p><strong>Building and running</strong></p> <pre><code>docker build -t php-fpm . docker run --user="$(id -u www-data)" --name=php-fpm --rm -it -p 127.0.0.1:9000:9000 php-fpm:latest [14-Nov-2018 13:35:23] NOTICE: fpm is running, pid 1 [14-Nov-2018 13:35:23] NOTICE: ready to handle connections </code></pre> <p><strong>NGINX PHP Settings</strong></p> <pre><code>include /etc/nginx/fastcgi_params; fastcgi_intercept_errors on; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_buffers 16 16k; fastcgi_buffer_size 32k; </code></pre> </div>

我启动了`php-fpm`,但在我的CentOS7中找不到`php-fpm.sock`文件

<div class="post-text" itemprop="text"> <p>I started the <code>php-fpm</code>, but can not find the <code>php-fpm.sock</code> file in my CentOS7.</p> <p>I use this command installed the php7 and php7-fpm:</p> <pre><code>yum install php70w-common php70w-fpm php70w-opcache php70w-gd php70w-mysqlnd php70w-mbstring php70w-pecl-redis php70w-pecl-memcached php70w-devel </code></pre> <p>I started the php-fpm:</p> <pre><code>/usr/sbin/php-fpm </code></pre> <p>but I can not find the <code>php-fpm.sock</code> file in my CentOS7.2, I can find the <code>php-fpm.pid</code> in there:</p> <pre><code>/var/run/php-fpm/php-fpm.pid </code></pre> <hr> <p><strong>EDIT-01</strong></p> <p>I use the <code>ss -x -a</code>, did not find the <code>php-fpm.sock</code>.</p> <pre><code>$ ss -x -a Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port u_str LISTEN 0 128 /run/lvm/lvmpolld.socket 8458 * 0 u_dgr UNCONN 0 0 /run/systemd/shutdownd 8465 * 0 u_str LISTEN 0 128 /run/docker/libnetwork/d47cac5c2e8dd9490d56a5067ec009db0aa0e0df52b4321c51bff8f6062f6166.sock 110335003 * 0 u_str LISTEN 0 128 /var/run/docker.sock 110329383 * 0 u_dgr UNCONN 0 0 /run/systemd/cgroups-agent 3853374 * 0 u_str LISTEN 0 128 /run/systemd/private 110322498 * 0 u_str LISTEN 0 30 /var/run/NetworkManager/private 9026 * 0 u_dgr UNCONN 0 0 /run/systemd/notify 1355 * 0 u_str LISTEN 0 128 /var/run/dbus/system_bus_socket 9805 * 0 u_str LISTEN 0 128 /run/systemd/journal/stdout 1364 * 0 u_dgr UNCONN 0 0 /run/systemd/journal/socket 1367 * 0 u_dgr UNCONN 0 0 /dev/log 1369 * 0 u_seq LISTEN 0 128 /run/udev/control 3852388 * 0 u_str LISTEN 0 5 /var/run/screen/S-root/9870..www 128997222 * 0 u_str LISTEN 0 128 /var/run/docker/libcontainerd/docker-containerd.sock 110326421 * 0 u_str LISTEN 0 80 /var/lib/mysql/mysql.sock 4072947 * 0 u_str LISTEN 0 128 /run/lvm/lvmetad.socket 8373 * 0 u_str ESTAB 0 0 /run/systemd/journal/stdout 19620 * 18806 u_str ESTAB 0 0 * 18650 * 9123 u_str ESTAB 0 0 /run/systemd/journal/stdout 8155 * 17962 u_dgr UNCONN 0 0 * 110327085 * 1369 u_dgr UNCONN 0 0 * 9025 * 1369 u_str ESTAB 0 0 * 18179 * 19621 u_str ESTAB 0 0 * 8176 * 8175 u_str ESTAB 0 0 * 110322500 * 110325911 u_str ESTAB 0 0 * 15930 * 10704 u_str ESTAB 0 0 * 130300393 * 130300392 u_str ESTAB 0 0 /run/systemd/journal/stdout 110325177 * 110327913 u_str ESTAB 0 0 * 9028 * 15825 u_str ESTAB 0 0 * 130011125 * 130011124 u_str ESTAB 0 0 * 18806 * 19620 u_str ESTAB 0 0 /var/run/dbus/system_bus_socket 10705 * 19546 u_str ESTAB 0 0 * 18596 * 8177 u_str ESTAB 0 0 /run/systemd/journal/stdout 4070758 * 4074559 u_str ESTAB 0 0 /var/run/dbus/system_bus_socket 19553 * 9145 u_str ESTAB 0 0 /var/run/docker/libcontainerd/docker-containerd.sock 110329386 * 110332150 u_dgr UNCONN 0 0 * 9938 * 1369 u_dgr UNCONN 0 0 * 110322566 * 1369 u_str ESTAB 0 0 /run/systemd/journal/stdout 19621 * 18179 u_dgr UNCONN 0 0 * 9147 * 1369 u_str ESTAB 0 0 /run/systemd/journal/stdout 10704 * 15930 u_str ESTAB 0 0 * 110327913 * 110325177 u_str ESTAB 0 0 * 130011124 * 130011125 u_str ESTAB 0 0 /var/run/dbus/system_bus_socket 15825 * 9028 u_dgr UNCONN 0 0 * 18585 * 1367 u_str ESTAB 0 0 * 8175 * 8176 u_str ESTAB 0 0 * 130013581 * 130013580 u_str ESTAB 0 0 * 12146 * 9463 u_str ESTAB 0 0 * 17234 * 21801 u_str ESTAB 0 0 * 3851403 * 3849440 u_dgr UNCONN 0 0 * 3845588 * 1367 u_str ESTAB 0 0 * 9145 * 19553 u_dgr UNCONN 0 0 * 130300389 * 1369 u_str ESTAB 0 0 * 19546 * 10705 u_str ESTAB 0 0 * 130013580 * 130013581 u_str ESTAB 0 0 * 110333809 * 110331364 u_str ESTAB 0 0 /var/run/dbus/system_bus_socket 21801 * 17234 u_str ESTAB 0 0 /run/systemd/journal/stdout 8152 * 16751 u_str ESTAB 0 0 /run/systemd/journal/stdout 8151 * 15671 u_str ESTAB 0 0 /run/systemd/journal/stdout 110331364 * 110333809 u_str ESTAB 0 0 * 110322568 * 110322567 u_str ESTAB 0 0 * 4074559 * 4070758 u_str ESTAB 0 0 /run/systemd/journal/stdout 9463 * 12146 u_str ESTAB 0 0 * 17962 * 8155 u_str ESTAB 0 0 /var/run/dbus/system_bus_socket 110325911 * 110322500 u_str ESTAB 0 0 /run/systemd/journal/stdout 18006 * 15757 u_dgr UNCONN 0 0 * 3845606 * 3845607 u_str ESTAB 0 0 /var/run/dbus/system_bus_socket 9123 * 18650 u_str ESTAB 0 0 * 15757 * 18006 u_str ESTAB 0 0 * 110322567 * 110322568 u_dgr UNCONN 0 0 * 110329381 * 1367 u_dgr UNCONN 0 0 * 3845607 * 3845606 u_str ESTAB 0 0 * 16751 * 8152 u_str ESTAB 0 0 * 110332150 * 110329386 u_str ESTAB 0 0 /var/run/dbus/system_bus_socket 8177 * 18596 u_str ESTAB 0 0 * 15671 * 8151 u_dgr UNCONN 0 0 * 130020259 * 1367 u_str ESTAB 0 0 * 130300392 * 130300393 u_str ESTAB 0 0 /run/systemd/journal/stdout 3849440 * 3851403 </code></pre> </div>

Docker wordpress-php-fpm-alpine总是给404

<div class="post-text" itemprop="text"> <p>I'm following <a href="https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-docker-compose#step-5-%E2%80%94-modifying-the-web-server-configuration-and-service-definition" rel="nofollow noreferrer">this guide</a> to get a docker-compose setup with multiple Wordpress installations.</p> <p>When I <code>GET /</code> on the <code>webserver</code> IP address, I get a message stating "File not found."</p> <p>In the docker logs I see:</p> <pre><code>wordpress-myclient | 172.20.0.4 - 01/Jul/2019:20:28:37 +0000 "GET /index.php" 404 webserver | 2019/07/01 20:28:37 [error] 7#7: *23 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: MY_HOME_IP, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://172.20.0.3:9000", host: "THE_SERVER_PUBLIC_IP" webserver | MY_HOME_IP - - [01/Jul/2019:20:28:37 +0000] "GET / HTTP/1.1" 404 27 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15" "-" </code></pre> <p>The root cause appears to be <code>wordpress-myclient</code> having an incorrectly configured php-fpm. I've searched high and low on the documentation for the Wordpress docker image to no avail. I see nothing else in the logs.</p> <p>Any help is appreciated. Thanks in advance.</p> <p>docker-compose.yml:</p> <pre><code>version: '3' services: db: image: mariadb/server:latest container_name: db restart: unless-stopped env_file: .env volumes: - dbdata:/var/lib/mysql - ./mysql/init:/docker-entrypoint-initdb.d command: '--default-authentication-plugin=mysql_native_password' networks: - app-network wordpress-myclient: depends_on: - db image: wordpress:5-fpm-alpine container_name: wordpress-myclient restart: unless-stopped env_file: .env environment: - WORDPRESS_DB_HOST=db:3306 - WORDPRESS_DB_USER=$MYSQL_USER_myclient - WORDPRESS_DB_PASSWORD=$MYSQL_PASSWORD_myclient - WORDPRESS_DB_NAME=$MYSQL_USER_myclient volumes: - wordpress-myclient:/var/www/html networks: - app-network webserver: depends_on: - wordpress-myclient image: nginx:1-alpine container_name: webserver restart: unless-stopped ports: - "80:80" - "443:443" environment: - NGINX_SERVER_ROOT=/var/www/html volumes: - wordpress-myclient:/var/www/html/wordpress-myclient - ./nginx-conf:/etc/nginx/conf.d - certbot-etc:/etc/letsencrypt networks: - app-network volumes: wordpress-myclient: dbdata: certbot-etc: networks: app-network: driver: bridge </code></pre> <p>nginx.conf:</p> <pre><code>server { listen 80; listen [::]:80; # server_name myclient.com www.myclient.com; index index.php index.html index.htm; root /var/www/html/wordpress-myclient; location ~ /.well-known/acme-challenge { allow all; root /var/www/html/wordpress-myclient; } location / { try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass wordpress-myclient:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } location ~ /\.ht { deny all; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { log_not_found off; access_log off; allow all; } location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ { expires max; log_not_found off; } } </code></pre> </div>

PHP-FPM进程正在增长并且内存越来越多

<div class="post-text" itemprop="text"> <p>I have some process of php-fpm always growing.</p> <p>Showing the memory used (with ps command) shows this.</p> <p>I have tried two things: </p> <p>1) strace, but there's tons and tons of information. It's a Symfony framework and I see tons of files being accessed or opened, but no clue at all. Neverending log ... each 1 or 2 or 3 seconds, it shows 2000 lines of trace suddenly.</p> <p>I see this:</p> <pre><code>fstat(7, {st_mode=S_IFREG|0644, st_size=1029, ...}) = 0 fstat(7, {st_mode=S_IFREG|0644, st_size=1029, ...}) = 0 fstat(7, {st_mode=S_IFREG|0644, st_size=1029, ...}) = 0 mmap(NULL, 1029, PROT_READ, MAP_SHARED, 7, 0) = 0x7f88da53d000 munmap(0x7f88da53d000, 1029) = 0 close(7) = 0 chdir("/") = 0 clock_gettime(CLOCK_MONOTONIC, {21720, 148391054}) = 0 times({tms_utime=6933, tms_stime=7614, tms_cutime=0, tms_cstime=0}) = 1720128933 close(11) = 0 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 umask(022) = 0 sendto(12, "\1\0\0\0\1", 5, MSG_DONTWAIT, NULL, 0) = 5 close(12) = 0 fcntl(6, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0 munmap(0x7f88ba000000, 2097152) = 0 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 clock_gettime(CLOCK_MONOTONIC, {21720, 149294252}) = 0 accept(0, </code></pre> <p>then it stops for 1-5 seconds, and the it shows 2000 lines of a lot of lstat files of the framework... houndreds of blocks like this one (this is ONE as example, but all blocks are <strong>different</strong></p> <pre><code>lstat("/var/www/vhosts/mywebsite.com/vendor/composer/../symfony/swiftmailer-bundle/DependencyInjection/SmtpTransportConfigurator.php", {st_mode=S_IFREG|0644, st_size=1029, ...}) = 0 lstat("/var/www/vhosts/mywebsite.com/vendor/composer/../symfony/swiftmailer-bundle/DependencyInjection", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/www/vhosts/mywebsite.com/vendor/composer/../symfony/swiftmailer-bundle", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/www/vhosts/mywebsite.com/vendor/composer/../symfony", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/www/vhosts/mywebsite.com/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/www/vhosts/mywebsite.com/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/www/vhosts/mywebsite.com", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 lstat("/var/www/vhosts/mywebsite.com", {st_mode=S_IFDIR|0710, st_size=4096, ...}) = 0 lstat("/var/www/vhosts", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 </code></pre> <p>2) lsof but I can't get information of what script is, or why.</p> <pre><code>COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME php-fpm 25690 www_plesk cwd DIR 202,1 4096 2 / php-fpm 25690 www_plesk rtd DIR 202,1 4096 2 / php-fpm 25690 www_plesk txt REG 202,1 4821232 1537261 /opt/plesk/php/7.2/sbin/php-fpm php-fpm 25690 www_plesk DEL REG 0,5 1406882 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406876 /dev/zero php-fpm 25690 www_plesk mem REG 202,1 27000 1985 /lib/x86_64-linux-gnu/libnss_dns-2.23.so php-fpm 25690 www_plesk mem REG 202,1 26258 24695 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache php-fpm 25690 www_plesk DEL REG 0,5 1406861 /dev/zero php-fpm 25690 www_plesk mem REG 202,1 47600 1991 /lib/x86_64-linux-gnu/libnss_files-2.23.so php-fpm 25690 www_plesk mem REG 202,1 47648 1995 /lib/x86_64-linux-gnu/libnss_nis-2.23.so php-fpm 25690 www_plesk mem REG 202,1 93128 1968 /lib/x86_64-linux-gnu/libnsl-2.23.so php-fpm 25690 www_plesk mem REG 202,1 35688 1983 /lib/x86_64-linux-gnu/libnss_compat-2.23.so php-fpm 25690 www_plesk mem REG 202,1 134624 1328699 /opt/plesk/php/7.2/lib/php/modules/zip.so php-fpm 25690 www_plesk mem REG 202,1 247952 50760 /usr/lib/x86_64-linux-gnu/libxslt.so.1.1.28 php-fpm 25690 www_plesk mem REG 202,1 83816 50761 /usr/lib/x86_64-linux-gnu/libexslt.so.0.8.17 php-fpm 25690 www_plesk mem REG 202,1 31752 1328672 /opt/plesk/php/7.2/lib/php/modules/xsl.so php-fpm 25690 www_plesk mem REG 202,1 47816 1328671 /opt/plesk/php/7.2/lib/php/modules/xmlwriter.so php-fpm 25690 www_plesk mem REG 202,1 81096 1328675 /opt/plesk/php/7.2/lib/php/modules/xmlrpc.so php-fpm 25690 www_plesk mem REG 202,1 31528 1328674 /opt/plesk/php/7.2/lib/php/modules/xmlreader.so php-fpm 25690 www_plesk mem REG 202,1 383544 53078 /usr/lib/libtidy-0.99.so.0.0.0 php-fpm 25690 www_plesk mem REG 202,1 52360 1328682 /opt/plesk/php/7.2/lib/php/modules/tidy.so php-fpm 25690 www_plesk mem REG 202,1 14792 1328666 /opt/plesk/php/7.2/lib/php/modules/sysvshm.so php-fpm 25690 www_plesk mem REG 202,1 10600 1328667 /opt/plesk/php/7.2/lib/php/modules/sysvsem.so php-fpm 25690 www_plesk mem REG 202,1 14888 1328669 /opt/plesk/php/7.2/lib/php/modules/sysvmsg.so php-fpm 25690 www_plesk mem REG 202,1 998080 1328679 /opt/plesk/php/7.2/lib/php/modules/sqlite3.so php-fpm 25690 www_plesk mem REG 202,1 303432 1328693 /opt/plesk/php/7.2/lib/php/modules/soap.so php-fpm 25690 www_plesk mem REG 202,1 695312 51937 /usr/lib/x86_64-linux-gnu/libaspell.so.15.2.0 php-fpm 25690 www_plesk mem REG 202,1 23080 1328670 /opt/plesk/php/7.2/lib/php/modules/pspell.so php-fpm 25690 www_plesk mem REG 202,1 35816 1328668 /opt/plesk/php/7.2/lib/php/modules/posix.so php-fpm 25690 www_plesk mem REG 202,1 270512 1328697 /opt/plesk/php/7.2/lib/php/modules/phar.so php-fpm 25690 www_plesk mem REG 202,1 139048 1328680 /opt/plesk/php/7.2/lib/php/modules/pgsql.so php-fpm 25690 www_plesk mem REG 202,1 27896 1328677 /opt/plesk/php/7.2/lib/php/modules/pdo_sqlite.so php-fpm 25690 www_plesk mem REG 202,1 194544 9381 /usr/lib/x86_64-linux-gnu/libpq.so.5.8 php-fpm 25690 www_plesk mem REG 202,1 44600 1328681 /opt/plesk/php/7.2/lib/php/modules/pdo_pgsql.so php-fpm 25690 www_plesk mem REG 202,1 27768 1328687 /opt/plesk/php/7.2/lib/php/modules/pdo_odbc.so php-fpm 25690 www_plesk mem REG 202,1 31672 1328684 /opt/plesk/php/7.2/lib/php/modules/pdo_mysql.so php-fpm 25690 www_plesk mem REG 202,1 110168 1328678 /opt/plesk/php/7.2/lib/php/modules/pdo.so php-fpm 25690 www_plesk mem REG 202,1 427552 51744 /usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0 php-fpm 25690 www_plesk mem REG 202,1 68680 1328686 /opt/plesk/php/7.2/lib/php/modules/odbc.so php-fpm 25690 www_plesk mem REG 202,1 134296 1328683 /opt/plesk/php/7.2/lib/php/modules/mysqli.so php-fpm 25690 www_plesk mem REG 202,1 1674464 1328665 /opt/plesk/php/7.2/lib/php/modules/mbstring.so php-fpm 25690 www_plesk mem REG 202,1 72872 1328691 /opt/plesk/php/7.2/lib/php/modules/ldap.so php-fpm 25690 www_plesk mem REG 202,1 43624 1328700 /opt/plesk/php/7.2/lib/php/modules/json.so php-fpm 25690 www_plesk mem REG 202,1 55304 25752 /usr/lib/x86_64-linux-gnu/libicuio.so.55.1 php-fpm 25690 www_plesk mem REG 202,1 2496856 25754 /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1 php-fpm 25690 www_plesk mem REG 202,1 482160 1328692 /opt/plesk/php/7.2/lib/php/modules/intl.so php-fpm 25690 www_plesk mem REG 202,1 117288 2603 /lib/x86_64-linux-gnu/libaudit.so.1.0.0 php-fpm 25690 www_plesk mem REG 202,1 55904 21215 /lib/x86_64-linux-gnu/libpam.so.0.83.1 php-fpm 25690 www_plesk mem REG 202,1 1100216 50574 /usr/lib/libc-client.so.2007e.0 php-fpm 25690 www_plesk mem REG 202,1 89480 1328695 /opt/plesk/php/7.2/lib/php/modules/imap.so php-fpm 25690 www_plesk mem REG 202,1 166032 1979 /lib/x86_64-linux-gnu/libexpat.so.1.6.0 php-fpm 25690 www_plesk mem REG 202,1 39272 50718 /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.1 php-fpm 25690 www_plesk mem REG 202,1 73640 25834 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0 php-fpm 25690 www_plesk mem REG 202,1 273832 51273 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.9.0 php-fpm 25690 www_plesk mem REG 202,1 2087104 51314 /usr/lib/x86_64-linux-gnu/libfftw3.so.3.4.4 php-fpm 25690 www_plesk mem REG 202,1 96504 51337 /usr/lib/x86_64-linux-gnu/liblqr-1.so.0.3.2 php-fpm 25690 www_plesk mem REG 202,1 353392 51331 /usr/lib/x86_64-linux-gnu/liblcms2.so.2.0.6 php-fpm 25690 www_plesk mem REG 202,1 138448 51307 /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0 php-fpm 25690 www_plesk mem REG 202,1 2707304 9717 /usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.2.0.0 php-fpm 25690 www_plesk mem REG 202,1 1200744 6527 /usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.2.0.0 php-fpm 25690 www_plesk mem REG 202,1 426816 1328701 /opt/plesk/php/7.2/lib/php/modules/imagick.so php-fpm 25690 www_plesk mem REG 202,1 22640 25828 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 php-fpm 25690 www_plesk mem REG 202,1 14456 25826 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0 php-fpm 25690 www_plesk mem REG 202,1 137728 25830 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 php-fpm 25690 www_plesk mem REG 202,1 1285552 25832 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 php-fpm 25690 www_plesk mem REG 202,1 694800 25840 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.12.1 php-fpm 25690 www_plesk mem REG 202,1 363264 51325 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 php-fpm 25690 www_plesk mem REG 202,1 149904 2138 /lib/x86_64-linux-gnu/libpng12.so.0.54.0 php-fpm 25690 www_plesk mem REG 202,1 72520 51670 /usr/lib/x86_64-linux-gnu/libXpm.so.4.11.0 php-fpm 25690 www_plesk mem REG 202,1 389088 1328694 /opt/plesk/php/7.2/lib/php/modules/gd.so php-fpm 25690 www_plesk mem REG 202,1 5045800 1328698 /opt/plesk/php/7.2/lib/php/modules/fileinfo.so php-fpm 25690 www_plesk mem REG 202,1 1115136 2154 /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2 php-fpm 25690 www_plesk mem REG 202,1 14656 25804 /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.4800.2 php-fpm 25690 www_plesk mem REG 202,1 46944 52829 /usr/lib/x86_64-linux-gnu/libenchant.so.1.6.0 php-fpm 25690 www_plesk mem REG 202,1 23904 1328688 /opt/plesk/php/7.2/lib/php/modules/enchant.so php-fpm 25690 www_plesk mem REG 202,1 172216 1328673 /opt/plesk/php/7.2/lib/php/modules/dom.so php-fpm 25690 www_plesk mem REG 202,1 1756696 24914 /usr/lib/x86_64-linux-gnu/libdb-5.3.so php-fpm 25690 www_plesk mem REG 202,1 52776 1328690 /opt/plesk/php/7.2/lib/php/modules/dba.so php-fpm 25690 www_plesk mem REG 202,1 39224 1997 /lib/x86_64-linux-gnu/libcrypt-2.23.so php-fpm 25690 www_plesk mem REG 202,1 870240 25802 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 php-fpm 25690 www_plesk mem REG 202,1 304072 25885 /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0 php-fpm 25690 www_plesk mem REG 202,1 60928 25881 /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0 php-fpm 25690 www_plesk mem REG 202,1 166128 25883 /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0 php-fpm 25690 www_plesk mem REG 202,1 31104 25780 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 php-fpm 25690 www_plesk mem REG 202,1 89904 25873 /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0 php-fpm 25690 www_plesk mem REG 202,1 204168 25878 /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0 php-fpm 25690 www_plesk mem REG 202,1 661872 25875 /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0 php-fpm 25690 www_plesk mem REG 202,1 560808 25887 /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0 php-fpm 25690 www_plesk mem REG 202,1 35920 25889 /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0 php-fpm 25690 www_plesk mem REG 202,1 14256 2172 /lib/x86_64-linux-gnu/libkeyutils.so.1.5 php-fpm 25690 www_plesk mem REG 202,1 76192 25740 /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1 php-fpm 25690 www_plesk mem REG 202,1 408472 25738 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0 php-fpm 25690 www_plesk mem REG 202,1 264256 25891 /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0 php-fpm 25690 www_plesk mem REG 202,1 109296 25916 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25 php-fpm 25690 www_plesk mem REG 202,1 43664 25861 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1 php-fpm 25690 www_plesk mem REG 202,1 14648 1960 /lib/x86_64-linux-gnu/libcom_err.so.2.1 php-fpm 25690 www_plesk mem REG 202,1 186872 25865 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1 php-fpm 25690 www_plesk mem REG 202,1 860392 25867 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3 php-fpm 25690 www_plesk mem REG 202,1 219336 25734 /usr/lib/x86_64-linux-gnu/libnettle.so.6.2 php-fpm 25690 www_plesk mem REG 202,1 207640 25732 /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2 php-fpm 25690 www_plesk mem REG 202,1 1239440 25744 /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2 php-fpm 25690 www_plesk mem REG 202,1 322928 10117 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5 php-fpm 25690 www_plesk mem REG 202,1 59640 10118 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5 php-fpm 25690 www_plesk mem REG 202,1 301376 25869 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2 php-fpm 25690 www_plesk mem REG 202,1 113584 25923 /usr/lib/x86_64-linux-gnu/librtmp.so.1 php-fpm 25690 www_plesk mem REG 202,1 207208 25736 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15 php-fpm 25690 www_plesk mem REG 202,1 452992 10557 /usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0 php-fpm 25690 www_plesk mem REG 202,1 89256 1287184 /opt/plesk/php/7.2/lib/php/modules/curl.so php-fpm 25690 www_plesk mem REG 202,1 35344 1328676 /opt/plesk/php/7.2/lib/php/modules/bcmath.so php-fpm 25690 www_plesk mem REG 202,1 256760 1328685 /opt/plesk/php/7.2/lib/php/modules/mysqlnd.so php-fpm 25690 www_plesk mem REG 202,1 15185280 2826090 /opt/dynatrace/oneagent/agent/lib64/liboneagentphp.so php-fpm 25690 www_plesk mem REG 202,1 4816792 2826084 /opt/dynatrace/oneagent/agent/lib64/liboneagentloader.so php-fpm 25690 www_plesk mem REG 202,1 438752 1328689 /opt/plesk/php/7.2/lib/php/modules/opcache.so php-fpm 25690 www_plesk mem REG 202,1 1385896 1283865 /opt/plesk/php/7.2/lib/php/modules/ioncube_loader_lin_7.2.so php-fpm 25690 www_plesk DEL REG 0,5 1406862 /dev/zero php-fpm 25690 www_plesk mem REG 202,1 1668976 28956 /usr/lib/locale/locale-archive php-fpm 25690 www_plesk mem REG 202,1 89696 1965 /lib/x86_64-linux-gnu/libgcc_s.so.1 php-fpm 25690 www_plesk mem REG 202,1 1566440 51083 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 php-fpm 25690 www_plesk mem REG 202,1 25913104 25753 /usr/lib/x86_64-linux-gnu/libicudata.so.55.1 php-fpm 25690 www_plesk mem REG 202,1 80496 2002 /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0 php-fpm 25690 www_plesk mem REG 202,1 456632 2066 /lib/x86_64-linux-gnu/libpcre.so.3.13.2 php-fpm 25690 www_plesk mem REG 202,1 1636360 25757 /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1 php-fpm 25690 www_plesk mem REG 202,1 919168 1001 /lib/x86_64-linux-gnu/libgcrypt.so.20.0.5 php-fpm 25690 www_plesk mem REG 202,1 137400 2004 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 php-fpm 25690 www_plesk mem REG 202,1 130224 2073 /lib/x86_64-linux-gnu/libselinux.so.1 php-fpm 25690 www_plesk mem REG 202,1 18624 2107 /lib/x86_64-linux-gnu/libattr.so.1.1.0 php-fpm 25690 www_plesk mem REG 202,1 138696 1970 /lib/x86_64-linux-gnu/libpthread-2.23.so php-fpm 25690 www_plesk mem REG 202,1 1868984 1971 /lib/x86_64-linux-gnu/libc-2.23.so php-fpm 25690 www_plesk mem REG 202,1 2361856 21565 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 php-fpm 25690 www_plesk mem REG 202,1 428384 21561 /lib/x86_64-linux-gnu/libssl.so.1.0.0 php-fpm 25690 www_plesk mem REG 202,1 1809656 25949 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3 php-fpm 25690 www_plesk mem REG 202,1 31232 1987 /lib/x86_64-linux-gnu/libacl.so.1.1.0 php-fpm 25690 www_plesk mem REG 202,1 14608 1973 /lib/x86_64-linux-gnu/libdl-2.23.so php-fpm 25690 www_plesk mem REG 202,1 1088952 1967 /lib/x86_64-linux-gnu/libm-2.23.so php-fpm 25690 www_plesk mem REG 202,1 31712 1996 /lib/x86_64-linux-gnu/librt-2.23.so php-fpm 25690 www_plesk mem REG 202,1 104864 2120 /lib/x86_64-linux-gnu/libz.so.1.2.8 php-fpm 25690 www_plesk mem REG 202,1 66800 2111 /lib/x86_64-linux-gnu/libbz2.so.1.0.4 php-fpm 25690 www_plesk mem REG 202,1 522664 25784 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 php-fpm 25690 www_plesk mem REG 202,1 101200 1975 /lib/x86_64-linux-gnu/libresolv-2.23.so php-fpm 25690 www_plesk mem REG 202,1 548432 747 /lib/x86_64-linux-gnu/liboneagentproc.so php-fpm 25690 www_plesk mem REG 202,1 162632 1969 /lib/x86_64-linux-gnu/ld-2.23.so php-fpm 25690 www_plesk DEL REG 0,5 1406870 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406867 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406866 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406865 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406864 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406863 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406846 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406845 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406844 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406843 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406842 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406841 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406840 /dev/zero php-fpm 25690 www_plesk DEL REG 0,5 1406839 /dev/zero php-fpm 25690 www_plesk mem REG 202,1 536520 2093 /lib/x86_64-linux-gnu/libsystemd.so.0.14.0 php-fpm 25690 www_plesk 0u unix 0xffff8803a285a000 0t0 1406893 /var/www/vhosts/system/mywebsite.com/php-fpm.sock type=STREAM php-fpm 25690 www_plesk 1w FIFO 0,10 0t0 1407453 pipe php-fpm 25690 www_plesk 2w FIFO 0,10 0t0 1407454 pipe php-fpm 25690 www_plesk 3r CHR 1,9 0t0 11 /dev/urandom php-fpm 25690 www_plesk 4w CHR 1,8 0t0 10 /dev/random php-fpm 25690 www_plesk 6u REG 202,1 0 513276 /tmp/.ZendSem.1t93Xa (deleted) php-fpm 25690 www_plesk 8r CHR 1,9 0t0 11 /dev/urandom php-fpm 25690 www_plesk 9w FIFO 0,10 0t0 1406869 pipe php-fpm 25690 www_plesk 11u unix 0xffff8803a2bf8800 0t0 1418861 type=STREAM </code></pre> <p>Any other chance to get real information of the script running ?</p> <p>More info:</p> <p>part of the top</p> <pre><code>top - 21:13:22 up 6:11, 2 users, load average: 0.84, 0.92, 0.89 Tasks: 206 total, 1 running, 205 sleeping, 0 stopped, 0 zombie %Cpu(s): 15.5 us, 5.4 sy, 0.0 ni, 78.8 id, 0.1 wa, 0.0 hi, 0.2 si, 0.2 st KiB Mem : 16431376 total, 8608756 free, 2660328 used, 5162292 buff/cache KiB Swap: 1048572 total, 1048572 free, 0 used. 13156496 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 9573 www_p+ 20 0 631700 99808 54084 S 30.9 0.6 0:01.86 php-fpm 9645 www_p+ 20 0 603164 50004 27864 S 11.6 0.3 0:00.35 php 26995 www_p+ 20 0 773664 231460 43620 S 6.6 1.4 2:06.97 php-fpm 25685 www_p+ 20 0 778512 238372 43632 S 3.7 1.5 2:57.93 php-fpm 25688 www_p+ 20 0 793032 251636 42408 S 3.7 1.5 2:16.99 php-fpm 25940 www_p+ 20 0 789220 250440 45004 S 3.7 1.5 2:14.46 php-fpm 25690 www_p+ 20 0 861668 251364 47144 S 2.3 1.5 2:27.00 php-fpm 25831 www_p+ 20 0 862860 251556 46112 S 2.3 1.5 2:20.00 php-fpm </code></pre> <p>output of a strace of one of them (php-fpm) with -c attribute (10 seconds):</p> <pre><code>% time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 63.17 0.018411 0 409063 700 lstat 27.45 0.008000 727 11 accept 2.45 0.000713 0 20071 fstat 2.00 0.000584 0 6582 mmap 1.45 0.000424 0 6905 close 1.21 0.000353 0 6872 open 1.04 0.000304 0 6588 munmap 0.38 0.000110 0 3065 clock_gettime 0.15 0.000043 0 247 lseek 0.15 0.000043 1 33 sendto 0.14 0.000041 0 912 read 0.09 0.000027 0 1214 gettimeofday 0.09 0.000026 3 9 brk 0.08 0.000022 0 383 31 stat 0.08 0.000022 0 706 288 access 0.07 0.000020 0 55 fcntl 0.00 0.000000 0 32 write 0.00 0.000000 0 384 poll 0.00 0.000000 0 88 rt_sigaction 0.00 0.000000 0 11 rt_sigprocmask 0.00 0.000000 0 22 ioctl 0.00 0.000000 0 6 madvise 0.00 0.000000 0 44 setitimer 0.00 0.000000 0 21 socket 0.00 0.000000 0 21 11 connect 0.00 0.000000 0 375 recvfrom 0.00 0.000000 0 11 shutdown 0.00 0.000000 0 22 setsockopt 0.00 0.000000 0 11 getsockopt 0.00 0.000000 0 11 getcwd 0.00 0.000000 0 22 chdir 0.00 0.000000 0 350 350 readlink 0.00 0.000000 0 33 umask 0.00 0.000000 0 22 times 0.00 0.000000 0 1 restart_syscall 0.00 0.000000 0 10 sendmmsg ------ ----------- ----------- --------- --------- ---------------- 100.00 0.029143 464213 1380 total </code></pre> <p>Notes: </p> <ul> <li>no crontabs involved</li> <li>if I kill one of those ram-consumer growing process, they start again (from about 30Mb, and grows again slowly ...) about 100Mb of growth each 15 minutes ....</li> </ul> </div>

docker-compose + Apache2 + php-fpm无法连接到{URL}端口80:连接被拒绝

<div class="post-text" itemprop="text"> <p>I have a problem when I' trying configuring my docker-compose. I have 2 websites that have to be connected to each other but when I try to do a <strong>curl</strong> inside php-fpm the response is this :</p> <blockquote> <p>curl: (7) Failed to connect to dev.test.adgo-tech.com port 80: Connection refused</p> </blockquote> <p>docker-compose.yaml</p> <pre><code>version: '2' services: ### ### APLICACIONES ### aplicaciones: image: tianon/true volumes: # Proyectos al mismo nivel de dockbox - ${APPLICATION}:/var/www ### ### SERVIDOR UBUNTU 16.04 ### servidor: build: context: ./server dockerfile: "Dockerfile-${PHP_VERSION}" args: - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG} - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP} - INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO} - INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE} - INSTALL_YARN=${WORKSPACE_INSTALL_YARN} - INSTALL_SASS=${WORKSPACE_INSTALL_SASS} - INSTALL_V8JS_EXTENSION=${WORKSPACE_INSTALL_INSTALL_V8JS_EXTENSION} - COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL} - INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH} - INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY} - INSTALL_LARAVEL_INSTALLER=${WORKSPACE_INSTALL_LARAVEL_INSTALLER} - INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER} - INSTALL_MC=${WORKSPACE_INSTALL_MC} - INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY} - INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON} - INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS} - INSTALL_ZMQ=${WORKSPACE_INSTALL_ZMQ} - PUID=${WORKSPACE_PUID} - PGID=${WORKSPACE_PGID} - NODE_VERSION=${WORKSPACE_NODE_VERSION} - YARN_VERSION=${WORKSPACE_YARN_VERSION} - TZ=${WORKSPACE_TIMEZONE} volumes_from: - aplicaciones extra_hosts: # IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts) # OBTENER CON: docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq) - "dockerhost:${DOCKER_HOST_IP}" ports: - "${WORKSPACE_SSH_PORT}:22" tty: true networks: - frontend - backend ### ### PHP ### php-fpm: build: context: ./php-fpm dockerfile: "Dockerfile-${PHP_VERSION}" args: - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} - INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP} - INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO} - INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL} - INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} - INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS} - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE} - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF} - INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI} - INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER} - INSTALL_INTL=${PHP_FPM_INSTALL_INTL} - INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT} - INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP} - INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE} - INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS} - INSTALL_ZMQ=${PHP_FPM_INSTALL_ZMQ} volumes_from: - aplicaciones volumes: - ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini expose: - "9000" depends_on: - servidor extra_hosts: - "dockerhost:${DOCKER_HOST_IP}" - "dev.test.adgo-tech.com:172.20.0.4" environment: - PHP_IDE_CONFIG=${PHP_IDE_CONFIG} networks: - backend ### ### NGINX ### nginx: build: context: ./nginx args: - PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER} - PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT} volumes_from: - aplicaciones volumes: - ${NGINX_HOST_LOG_PATH}:/var/log/nginx - ${NGINX_SITES_PATH}:/etc/nginx/sites-available ports: - "${NGINX_HOST_HTTP_PORT}:80" - "${NGINX_HOST_HTTPS_PORT}:443" depends_on: - php-fpm networks: - frontend - backend ### ### APACHE ### apache2: build: context: ./apache2 args: - PHP_UPSTREAM_CONTAINER=${APACHE_PHP_UPSTREAM_CONTAINER} - PHP_UPSTREAM_PORT=${APACHE_PHP_UPSTREAM_PORT} volumes_from: - aplicaciones volumes: - ${APACHE_HOST_LOG_PATH}:/var/log/apache2 - ./apache2/sites:/etc/apache2/sites-available ports: - "${APACHE_HOST_HTTP_PORT}:80" - "${APACHE_HOST_HTTPS_PORT}:443" - "${APACHE_HOST_SERVER_PORT}:5233" - "${APACHE_HOST_ZMQ_PORT}:5555" - 9000:9000 depends_on: - php-fpm networks: - frontend - backend ### ### MYSQL ### mysql: build: context: ./mysql args: - MYSQL_VERSION=${MYSQL_VERSION} environment: - MYSQL_DATABASE=${MYSQL_DATABASE} - MYSQL_USER=${MYSQL_USER} - MYSQL_PASSWORD=${MYSQL_PASSWORD} - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} - TZ=${WORKSPACE_TIMEZONE} volumes: - ${DATA_SAVE_PATH}/mysql:/var/lib/mysql - ${MYSQL_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d ports: - "${MYSQL_PORT}:3306" user: "1000:50" networks: - backend </code></pre> <p>vhost.conf</p> <pre><code>&lt;VirtualHost *:80&gt; ServerName dev.test.adgo-tech.com DocumentRoot /var/www/core/web Options Indexes FollowSymLinks &lt;Directory "/var/www/core/web"&gt; AllowOverride All &lt;IfVersion &lt; 2.4&gt; Allow from all &lt;/IfVersion&gt; &lt;IfVersion &gt;= 2.4&gt; Require all granted &lt;/IfVersion&gt; &lt;/Directory&gt; &lt;/VirtualHost&gt; </code></pre> <blockquote> <p>docker-compose exec php-fpm bash </p> </blockquote> <p>hosts</p> <pre><code>127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.20.0.2 dockerhost 172.20.0.4 dev.test.adgo-tech.com 172.20.0.4 c32dab0d80ff </code></pre> <p>I saw in the others threads that problem is in VirtualHost and it's necessary add this line but I can't get it to work.</p> <blockquote> <p>SetHandler "proxy:fcgi://php:9000"</p> </blockquote> <p>I'm starting to see how docker-compose works so my level is very low. If you need to show another file tell me to put it here</p> <p>Thank you</p> </div>

启动php-fpm(用ps命令查看有)但是killall php-fpm 报没发现php-fpm进程

![图片说明](https://img-ask.csdn.net/upload/201711/29/1511923324_414426.png) 我killall php-fpm 也是一样说没有发现该进程。想请教下这是为什么?一个个杀死pid 进程是没问题的

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

CSDN:因博主近期注重写专栏文章(已超过150篇),订阅博主专栏人数在突增,近期很有可能提高专栏价格(已订阅的不受影响),提前声明,敬请理解!

CSDN:因博主近期注重写专栏文章(已超过150篇),订阅博主专栏人数在突增,近期很有可能提高专栏价格(已订阅的不受影响),提前声明,敬请理解! 目录 博客声明 大数据了解博主粉丝 博主的粉丝群体画像 粉丝群体性别比例、年龄分布 粉丝群体学历分布、职业分布、行业分布 国内、国外粉丝群体地域分布 博主的近期访问每日增量、粉丝每日增量 博客声明 因近期博主写专栏的文章越来越多,也越来越精细,逐步优化文章。因此,最近一段时间,订阅博主专栏的人数增长也非常快,并且专栏价

我说我不会算法,阿里把我挂了。

不说了,字节跳动也反手把我挂了。

培训班出来的人后来都怎么样了?(二)

接着上回说,培训班学习生涯结束了。后面每天就是无休止的背面试题,不是没有头脑的背,培训公司还是有方法的,现在回想当时背的面试题好像都用上了,也被问到了。回头找找面试题,当时都是打印下来天天看,天天背。 不理解呢也要背,面试造飞机,上班拧螺丝。班里的同学开始四处投简历面试了,很快就有面试成功的,刚开始一个,然后越来越多。不知道是什么原因,尝到胜利果实的童鞋,不满足于自己通过的公司,嫌薪水要少了,选择...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

工作八年,月薪60K,裸辞两个月,投简历投到怀疑人生!

近日,有网友在某职场社交平台吐槽,自己裸辞两个月了,但是找工作却让自己的心态都要崩溃了,全部无果,不是已查看无回音,就是已查看不符合。 “工作八年,两年一跳,裸辞两个月了,之前月薪60K,最近找工作找的心态崩了!所有招聘工具都用了,全部无果,不是已查看无回音,就是已查看不符合。进头条,滴滴之类的大厂很难吗???!!!投简历投的开始怀疑人生了!希望 可以收到大厂offer” 先来看看网...

97年世界黑客编程大赛冠军作品(大小仅为16KB),惊艳世界的编程巨作

这是世界编程大赛第一名作品(97年Mekka ’97 4K Intro比赛)汇编语言所写。 整个文件只有4095个字节, 大小仅仅为16KB! 不仅实现了3D动画的效果!还有一段震撼人心的背景音乐!!! 内容无法以言语形容,实在太强大! 下面是代码,具体操作看最后! @echo off more +1 %~s0|debug e100 33 f6 bf 0 20 b5 10 f3 a5...

不要再到处使用 === 了

我们知道现在的开发人员都使用 === 来代替 ==,为什么呢?我在网上看到的大多数教程都认为,要预测 JavaScript 强制转换是如何工作这太复杂了,因此建议总是使用===。这些都...

什么是a站、b站、c站、d站、e站、f站、g站、h站、i站、j站、k站、l站、m站、n站?00后的世界我不懂!

A站 AcFun弹幕视频网,简称“A站”,成立于2007年6月,取意于Anime Comic Fun,是中国大陆第一家弹幕视频网站。A站以视频为载体,逐步发展出基于原生内容二次创作的完整生态,拥有高质量互动弹幕,是中国弹幕文化的发源地;拥有大量超粘性的用户群体,产生输出了金坷垃、鬼畜全明星、我的滑板鞋、小苹果等大量网络流行文化,也是中国二次元文化的发源地。 B站 全称“哔哩哔哩(bilibili...

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

MySQL性能优化(五):为什么查询速度这么慢

前期回顾: MySQL性能优化(一):MySQL架构与核心问题 MySQL性能优化(二):选择优化的数据类型 MySQL性能优化(三):深入理解索引的这点事 MySQL性能优化(四):如何高效正确的使用索引 前面章节我们介绍了如何选择优化的数据类型、如何高效的使用索引,这些对于高性能的MySQL来说是必不可少的。但这些还完全不够,还需要合理的设计查询。如果查询写的很糟糕,即使表结构再合理、索引再...

用了这个 IDE 插件,5分钟解决前后端联调!

点击上方蓝色“程序猿DD”,选择“设为星标”回复“资源”获取独家整理的学习资料!作者 |李海庆我是一个 Web 开发前端工程师,受到疫情影响,今天是我在家办公的第78天。开发了两周,...

大厂的 404 页面都长啥样?最后一个笑了...

每天浏览各大网站,难免会碰到404页面啊。你注意过404页面么?猿妹搜罗来了下面这些知名网站的404页面,以供大家欣赏,看看哪个网站更有创意: 正在上传…重新上传取消 腾讯 正在上传…重新上传取消 网易 淘宝 百度 新浪微博 正在上传…重新上传取消 新浪 京东 优酷 腾讯视频 搜...

【高并发】高并发秒杀系统架构解密,不是所有的秒杀都是秒杀!

网上很多的文章和帖子中在介绍秒杀系统时,说是在下单时使用异步削峰来进行一些限流操作,那都是在扯淡! 因为下单操作在整个秒杀系统的流程中属于比较靠后的操作了,限流操作一定要前置处理,在秒杀业务后面的流程中做限流操作是没啥卵用的。

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

代码注释如此沙雕,会玩还是你们程序员!

某站后端代码被“开源”,同时刷遍全网的,还有代码里的那些神注释。 我们这才知道,原来程序员个个都是段子手;这么多年来,我们也走过了他们的无数套路… 首先,产品经理,是永远永远吐槽不完的!网友的评论也非常扎心,说看这些代码就像在阅读程序员的日记,每一页都写满了对产品经理的恨。 然后,也要发出直击灵魂的质问:你是尊贵的付费大会员吗? 这不禁让人想起之前某音乐app的穷逼Vip,果然,穷逼在哪里都是...

Java14 新特性解读

Java14 已于 2020 年 3 月 17 号发布,官方特性解读在这里:https://openjdk.java.net/projects/jdk/14/以下是个人对于特性的中文式...

爬虫(101)爬点重口味的

小弟最近在学校无聊的很哪,浏览网页突然看到一张图片,都快流鼻血。。。然后小弟冥思苦想,得干一点有趣的事情python 爬虫库安装https://s.taobao.com/api?_ks...

疫情后北上广深租房价格跌了吗? | Alfred数据室

去年3月份我们发布了《北上广深租房图鉴》(点击阅读),细数了北上广深租房的各种因素对租房价格的影响。一年过去了,在面临新冠疫情的后续影响、城市尚未完全恢复正常运转、学校还没开学等情况下...

面试官给我挖坑:a[i][j] 和 a[j][i] 有什么区别?

点击上方“朱小厮的博客”,选择“设为星标”后台回复&#34;1024&#34;领取公众号专属资料本文以一个简单的程序开头——数组赋值:int LEN = 10000; int[][] ...

又一起程序员被抓事件

就在昨天互联网又发生一起让人心酸的程序员犯罪事件,著名的百度不限速下载软件 Pandownload PC 版作者被警方抓获。案件大致是这样的:软件的作者不仅非法盗取用户数据,还在QQ群进...

应聘3万的职位,有必要这么刁难我么。。。沙雕。。。

又一次被面试官带到坑里面了。面试官:springmvc用过么?我:用过啊,经常用呢面试官:springmvc中为什么需要用父子容器?我:嗯。。。没听明白你说的什么。面试官:就是contr...

太狠了,疫情期间面试,一个问题砍了我5000!

疫情期间找工作确实有点难度,想拿到满意的薪资,确实要点实力啊!面试官:Spring中的@Value用过么,介绍一下我:@Value可以标注在字段上面,可以将外部配置文件中的数据,比如可以...

Intellij IDEA 美化指南

经常有人问我,你的 IDEA 配色哪里搞的,我会告诉他我自己改的。作为生产力工具,不但要顺手而且更要顺眼。这样才能快乐编码,甚至降低 BUG 率。上次分享了一些 IDEA 有用的插件,反...

【相亲】96年程序员小哥第一次相亲,还没开始就结束了

颜值有点高,条件有点好

太厉害了,终于有人能把TCP/IP 协议讲的明明白白了

一图看完本文 一、 计算机网络体系结构分层 计算机网络体系结构分层 计算机网络体系结构分层 不难看出,TCP/IP 与 OSI 在分层模块上稍有区别。OSI 参考模型注重“通信协议必要的功能是什么”,而 TCP/IP 则更强调“在计算机上实现协议应该开发哪种程序”。 二、 TCP/IP 基础 1. TCP/IP 的具体含义 从字面意义上讲,有人可能会认为...

腾讯面试题: 百度搜索为什么那么快?

我还记得去年面腾讯时,面试官最后一个问题是:百度/google的搜索为什么那么快? 这个问题我懵了,我从来没想过,搜素引擎的原理是什么 然后我回答:百度爬取了各个网站的信息,然后进行排序,当输入关键词的时候进行文档比对……巴拉巴拉 面试官:这不是我想要的答案 我内心 这个问题我一直耿耿于怀,终于今天,我把他写出来,以后再问,我直接把这篇文章甩给他!!! 两个字:倒排,将贯穿整篇文章,也是面试官...

相关热词 c#跨线程停止timer c#批量写入sql数据库 c# 自动安装浏览器 c#语言基础考试题 c# 偏移量打印是什么 c# 绘制曲线图 c#框体中的退出函数 c# 按钮透明背景 c# idl 混编出错 c#在位置0处没有任何行
立即提问