开发者问题收集

我该如何解决配置进程器中的 fastcgi 错误?

2018-10-03
438

当我尝试安装 processmaker stackN220 时出现错误。 由于我不是企业客户,processmaker 的支持团队没有在对讲聊天中回答任何问题!

我的配置是:

#ProcessMaker HTTP Virtual Host

server {

  listen 80;
  listen [::]:80;
  #Change for server DNS name
  server_name processmakernginx.local;
  #The following line must be added Only if phpMyAdmin is configured
  #include /opt/phpMyAdmin/phpMyAdmin.conf;

  root /opt/processmaker/workflow/public_html; #where ProcessMaker is installed

  index index.html index.htm app.php index.php;

   try_files $uri $uri/ /index.php?$args;

  charset utf-8;

  location / {
    try_files $uri $uri/ /index.php?$query_string;
  }

location = /favicon.ico { access_log off; log_not_found off; }

  location = /robots.txt  { access_log off; log_not_found off; }

  access_log /var/log/nginx/pm-access.log combined; #enables access logs

  error_log  /var/log/nginx/pm-error.log error; #enables error logs

  sendfile off;

  client_max_body_size 100m;

 # Every PHP script must be routed to PHP-FPM

  location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php-fpm/processmaker.sock;
    fastcgi_index    app.php;

    include fastcgi_params;
    fastcgi_param    SCRIPT_FILENAME  /opt/processmaker/workflow/public_html/app.php;
    fastcgi_intercept_errors off;
    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;

  }

 #Browser Caching

  location ~* \.(ico|css|js|gif|jpeg|jpg|png|woff|ttf|otf|svg|woff2|eot)$ {
    expires 24h;
    add_header Cache-Control public;
    access_log off;
    log_not_found off;

    fastcgi_pass unix:/var/run/php-fpm/processmaker.sock;

    fastcgi_index    app.php;

    include fastcgi_params;

    fastcgi_param    SCRIPT_FILENAME   /opt/processmaker/workflow/public_html/app.php;

    fastcgi_intercept_errors off;

    fastcgi_buffers 8 16k;

    fastcgi_buffer_size 32k;

    fastcgi_connect_timeout 300;

    fastcgi_send_timeout 300;

    fastcgi_read_timeout 300;
 }


 location ~ /\.ht {
   deny all;
 }

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

} 

但出现错误

FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

当调用 URL 时,首先会有一个 html 文件将其重定向到

http://processmakernginx.local/sys/en/neoclassic/login/login 

mannual: https://wiki.processmaker.com/3.2/Stack_N220

file not found

出现。

2个回答

配置正确。 您可能错过了 /opt/processmaker/workflow/public_html 中的 app.php 文件

Hamid Shariati
2019-09-21

可能是 nginx 用户没有 /opt/processmaker 的权限。

user5224006
2020-08-29