草庐IT

nginx_install

全部标签

PHP/regex解析NGINX错误日志

错误条目如下所示:2011/06/1013:30:10[error]23263#0:*1directoryindexof"/var/www/ssl/"isforbidden,client:86.186.86.232,server:hotelpublisher.com,request:"GET/HTTP/1.1",host:"hotelpublisher.com"我需要解析:date/timeerrortypeerrormessageclientserverrequesthost第一位(解析日期)使用substr很容易。虽然我的REGEX不太好,但我希望听到更好的解决方案。我猜想,简单地

php - 输入 : '\' while installing Laravel 4 in a dreamhost account 中的意外字符

过去几个小时我一直在尝试在我的dreamhost帐户上安装Laravel4,但我一直收到此错误:Warning:Unexpectedcharacterininput:'\'(ASCII=92)state=1in/home/user/test/artisanonline46Parseerror:syntaxerror,unexpectedT_STRINGin/home/user/test/artisanonline46当我运行时/usr/local/bin/php-5.4-dmemory_limit=256Mcomposer.pharcreate-projectlaravel/larav

php - Fontawesome 字体在 Assets :install and assetic:dump 后失败

我正在尝试建立一个我在共享主机上工作的网站,一切正常,但FontAwesome图标因为Symfony找不到它们应该在的位置。我按照以下步骤将网站移至生产共享主机:将Assets发布为硬拷贝,因为SH不允许符号链接(symboliclink),所以我运行此命令assets:install通过运行以下命令发布由Assetic处理的Assets:assetic:dump(dev)和assetic:dump--env=prod(prod)但它不起作用,因为我在Firebug中一直遇到此错误:"NetworkError:404NotFound-http://tanane.com/bundles/

php - Docker:Nginx 和 PHP 容器:没有这样的文件或目录

我想玩转docker,所以我创建了自己的2个容器,nginx和php。两个容器都已成功构建并发布在dockerhub上。之后,我在我的项目文件夹中创建了一个fig.yml。如果我在终端中运行figup-d,则会收到以下错误:Recreatingplayground_php_1...Cannotstartcontainere087111c...:[8]Systemerror:nosuchfileordirectory有什么办法可以解决这个问题吗?这是我的fig.yml:web:image:mc388/docker-nginx:latestports:-"80:80"-"443:443"l

php - 当 PHP Fatal error 发生时,Nginx 向浏览器报告 HTTP Error 500

我的服务器是用Nginx+PHP+FastCGI设置的。每当PHP抛出fatalerror时,它都会记录在nginx/error.log中,但服务器会向浏览器报告HTTP错误500,而不是像其他设置中所期望的那样向浏览器显示PHPfatalerror。我一直在寻找如何解决这个问题,并一直在寻找解决办法。有人对此有帮助吗?非常感谢! 最佳答案 找到了!AsofPHP5.2.4,thedefaultisnowtocausea500error,因为备选方案是一个空页面。Otherdiscussions建议对于“PHP致命”错误类型不能更改

Phpmyadmin Export Dbase 在 PHP7 Nginx 上出现错误

我无法在PHP7和Nginx服务器上从PhpMyadmin导出数据库。/var/log/nginx/error.log说18FastCGIsentinstderr:"PHPmessage:PHPFatalerror:Cannot'break'2levelsin/usr/share/phpmyadmin/export.phponline864我已经尝试过sudoaptinstallphp7.0-mbstring和sudoservicenginxrestart但仍然无法正常工作。 最佳答案 转到/usr/share/phpmyadmin

Nginx配置https出现的问题与解决

1.nginx:[emerg]unknowndirective35+GAN"ssl"in/usr/local/nginx/conf/nginx.conf:28解决:出现这个问题的时候可以在你的/usr/local/nginx下输入./sbin/nginx-V检查一下是不是没有配置ssl模块./sbin/nginx-V如果没有出现下图,说明你的nginx没有配置ssl模块 配置ssl,到nginx安装目录下./configure--prefix=/usr/local/nginx--with-http_ssl_module使用make编译make编译完之后是否选择makeinstall可以自己决定

php - 分享 Nginx 服务器配置

如何在两台服务器之间共享通用配置。我的应用程序同时支持http和https(只有几页),我目前正在使用fastcgi_param来保存敏感信息,例如数据库名称和密码。我如何共享两个服务器(80、443)的位置和fastcgi_param。server{listen80;server_nameexample.com;}server{listen443ssl;server_nameexample.com;root/home/forge/example.com/public;#FORGESSL(DONOTREMOVE!)sslon;ssl_certificate/etc/nginx/ssl/

php - Laravel 代客 502 错误网关 nginx/1.15.7

我在运行Laravel代客服务的Laravel项目中收到502BadGateway。我在网上尝试了很多解决方案,但都没有成功。即https://gist.github.com/adamwathan/6ea40e90a804ea2b3f9f24146d86ad7f目前,我看到的错误是502badgateway,运行valetinstall时命令行中的错误是更新PHP配置时的错误。它给出了以下错误:Warning:file_get_contents(/usr/local/etc/php/7.3/php-fpm.d/www.conf):failedtoopenstream:Nosuchfil

php - "E: Package ' php-soap ' has no installation candidate"on php :7. 0-fpm Docker 镜像。退出代码:100

我想标题说明了一切......我有一个来自php:7.0-fpm图像的容器集。在Dockerfile中,我运行apt-getupdate&&apt-getinstall-yphp-soap。但是,它失败并返回100作为退出代码。此外,还有E:Package'php-soap'hasnoinstallationcandidate。基于此discussion,我需要安装apt-transport-https。我把它安装在Dockerfile中,但仍然是同样的错误。我该怎么办? 最佳答案 FPM镜像源码自带php。当您运行apt-geti