小编Jam*_*ton的帖子

无法使用 SSL 支持编译 nginx,找不到 OpenSSL

我正在尝试从启用 SSL 模块的源代码编译 nginx。当我运行此命令时:

./configure --with-http_ssl_module
Run Code Online (Sandbox Code Playgroud)

它会执行通常的检查以查看所有内容是否安装正确,然后会弹出:

检查 OpenSSL 库...未找到

./configure: 错误:SSL 模块需要 OpenSSL 库。您可以不启用这些模块,也可以将 OpenSSL 库安装到系统中,或者使用 --with-openssl= 选项使用 nginx 从源静态构建 OpenSSL 库。

我知道是安装OpenSSL的事实,因为当我做openssl version我得到OpenSSL 1.0.1 14 Mar 2012

所以我很难过。我想也许 OpenSSL 没有安装在它的默认位置,这就是 nginx 找不到它的原因,但我不知道它在哪里,因为它预装在服务器上。我怎样才能知道这是哪里?

服务器正在运行 Ubuntu 12.04 LTS。

谢谢。

ubuntu nginx openssl

22
推荐指数
1
解决办法
5万
查看次数

Nginx 不记录 PHP 错误

在我的网站上访问某些 PHP 脚本时,我收到了可怕的 500 错误消息。我想知道修复它有什么问题,但 Nginx 没有在我指定的日志文件中记录任何 PHP 错误。这是我的服务器块:

server {
    listen 80;
    server_name localhost;
    access_log /home/whitey/sites/localhost/logs/access.log;
    error_log /home/whitey/sites/localhost/logs/error.log error;
    root /home/whitey/sites/localhost/htdocs;
    index index.html index.php /index.php;

    location / { 

    }

    location ~ \.php$ {
        fastcgi_pass unix:/tmp/phpfpm.sock;
        fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
        expires max;
    }
}
Run Code Online (Sandbox Code Playgroud)

请注意,有些 PHP 脚本可以正常工作,而有些则不行。所以 PHP 不存在全局问题,只是这些脚本中的某些内容导致 Nginx 抛出 500 错误。

我怎样才能找到这个问题的根源?唯一的问题error.log是找不到有关 favicon.ico 的错误。

nginx logging php-fpm 500-error

7
推荐指数
2
解决办法
4万
查看次数

标签 统计

nginx ×2

500-error ×1

logging ×1

openssl ×1

php-fpm ×1

ubuntu ×1