MacOs Docker nginx.conf 配置

发布时间 2023-06-26 10:40:26作者: php的自我修养

`server {
listen 8089;
server_name localhost;

    client_max_body_size 120M;
    # php容器项目地址
    root /var/www/html/shop; 
    index index.php  index.html index.htm;
    location / {
      #try_files $uri $uri/ /index.php?s=$uri&$args;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

    location ~ \.php$ {
        # 容器运行的php端口
        fastcgi_pass   127.0.0.1:9002;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}`