AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-260728

Yamen Nassif's questions

Martin Hope
Yamen Nassif
Asked: 2016-11-12 08:00:59 +0800 CST

Symfony、CentOS、NGINX、php-fpm 缓存错误

  • 0

我在谷歌和这里搜索了两天,我尝试了每一个解决方案来解决这个问题,但似乎我总是错过一些东西。我在 AWS 服务器上安装并运行了 CentOS 7 以及 NGINX php-fpm(php 版本 5.6)。我的文件位于 /usr/share/nginx/html/website/

/etc/nginx/nginx.conf

...
user centos;
...

并且服务器已经使用http://symfony.com/doc/2.0/cookbook/configuration/web_server_configuration.html 和它的工作正常,因为我能够通过 ip 访问我的 symfony。

/etc/php-fpm.d/www.conf

....
user = centos
group = centos
....
listen.owner = centos
listen.group = centos
listen.mode = 0660
....
listen = /var/run/php-fpm/php-fpm.sock

symfony 项目中的文件权限全部分配给 centos:centos 用户和 var 是可写的。尽管使用用户 centos 的终端我可以创建/删除/删除/编辑任何内容,但我可以完全访问该项目中的所有文件和文件夹。但由于某种原因,当我点击服务器的 IP 地址时,出现此错误:

Failed to write cache file "/usr/share/nginx/html/website/apps/../var/marketplace/cache/dev/classes.php".

我添加了 echo exec('whoami'); 到 app_dev.php 我得到了 centos 用户,这意味着一切都应该顺利进行。

顺便说一句 ../var 是因为我在这个 symfony 项目中有多个应用程序有什么想法吗?

对于任何其他详细信息日志文件或我很乐意提供的任何内容。提前致谢

centos nginx php-fpm symfony
  • 1 个回答
  • 804 Views
Martin Hope
Yamen Nassif
Asked: 2014-12-22 03:36:45 +0800 CST

无法使用 nagios 和 nginx 访问 localhost

  • -2

我已经按照这个链接安装了 nagios,我已经启动并运行了 nginx。问题是我不断获取用户名和密码来进行身份验证。

当我删除 时auth_basic_user_file /etc/nagios/htpasswd.users;,我不会再收到该警报。但是这http://localhost/nagios给了我空白页。然后,当我使用 get that line back 时,我无法访问它。我什至尝试在这个线程中chown nagios /etc/nagios/htpasswd.users作为解决方案。

这是我的文件

htpasswd.users

yamen:NFy9PslWPh4Vo

我的网站

   server {
            server_name *********************************;
            access_log /var/log/nginx/access.log;
            error_log /var/log/nginx/error.log;
            auth_basic      "Yamen's Area!";
            auth_basic_user_file  /etc/nagios/htpasswd.users;
            root /home/yamen/repos/autoban-md/;
            index index.php index.html index.htm;
            #pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            location / {
                    try_files $uri $uri/ /index.php;
            }
            location /nagios {
                    alias /opt/nagios/nagios/share;
            }
            location ~ ^/nagios/(.*\.php)$ {
                    alias /opt/nagios/nagios/share/$1;
                    include /etc/nginx/fastcgi_params;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
            }
            location ~ \.cgi$ {
                    root /opt/nagios/nagios/sbin/;
                    rewrite ^/nagios/cgi-bin/(.*)\.cgi /$1.cgi break;
                    fastcgi_param AUTH_USER $remote_user;
                    fastcgi_param REMOTE_USER $remote_user;
                    include /etc/nginx/fastcgi_params;
                    fastcgi_pass unix:/var/run/fcgiwrap.socket;
            }
            error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            location ~\.php$ {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                    fastcgi_index  index.php;
                    include fastcgi_params;
            }
            location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
                    add_header "" "";
            }
            location ~ "^/pagespeed_static/" { }
            location ~ "^/ngx_pagespeed_beacon$" { }
    }

nagios.conf不提供任何东西。

我把上面的用户名,一遍遍的通过,什么都没发生

感谢@PaulHaldane,我确实发现了错误,但仍然不知道为什么会发生。这是 nginx 错误日志。

*108 user "yamen": password mismatch, client: 127.0.0.1, server: *************
ubuntu
  • 1 个回答
  • 569 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve