mod_passenger中出现意外错误无法连接到帮助程序代理程序

时间:2017-01-24 08:09:39

标签: ruby-on-rails apache passenger redmine

我的服务器有问题(redmine)。 我安装了Apache2 + phusion乘客。有时我有错误500。 当我看到apache日志(/var/log/apache2/error.log)时,我有以下内容,但我不明白:

using System;
using System.IO.Ports;

namespace RelayConsole
{
    class Program
    {
        public static SerialPort port = new SerialPort("COM5", 9600, Parity.None, 8, StopBits.One);
/* Replace COM5 with your COM port, 9600 with baud rate of your board, parity and bits as well as per your device documentation */

        static void Main(string[] args)
        {
            SerialProgram();
        }

        static void SerialProgram()
        {
            try
            {
                port.Open();
                port.Write("RELx.ON"); /* You can pass any command as per your documentation in port.Write */
                System.Threading.Thread.Sleep(3000);
                port.Write("RELx.OFF");
                Environment.Exit(0);
            }
            catch (Exception ex)
            {
                if(ex is System.IO.IOException)
                {
                    Console.WriteLine("Port Exception: " + ex.ToString());
                    Console.ReadLine();
                }
                else
                {
                    Console.WriteLine("General Exception: " + ex.ToString());
                    Console.ReadLine();
                }
            }
        }
    }
}

我已经完成了重启apache2并发出明确的问题。

1 个答案:

答案 0 :(得分:0)

错误行:

"App 29105 stderr: /var/lib/gems/1.9.1/gems/passenger-4.0.40/lib/phusion_passenger/platform_info.rb:352: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777".

建议所有用户都可以写入/ usr / local / bin文件夹。它可能导致乘客apache模块的安全相关问题。您可以尝试将/ usr / local / bin的权限设置为775并使用stick bit。

对我来说,/ usr / local / bin具有以下权限:

drwxrwsr-x  2 root staff   4096 Jun  6  2016 .