Articles of Ubuntu

nginx不能在启动时启动

我什么时候做什么 sudo update-rc.d nginx defaults 显示器 System start/stop links for /etc/init.d/nginx already exist. 但Nginx仍然不会重新启动?

为什么使用Passenger / nginx的Rails只能在开发模式下工作? 没有可用的日志

我有一个严重的问题与我们的一个networking服务器…在对mongrel / haproxy集群运行良好的内部alphatesting之后,我们希望使用nginx和乘客来访问我们的第一台生产服务器(客户将访问此服务器) 。 但是,我只能通过乘客/ nginx的开发模式运行rails应用程序。 应用程序本身与生产模式下的杂种或webrick运行完美。 我遇到的最大的问题是,我在nginx或rails-logs中找不到任何信息(只有当我使用mongrel或webrick时)。 权限是正确的。 乘客状态显示应用程序正在运行,但我总是得到静态的500.html错误页面… 如果你们可以给我一个提示,帮助我解决问题,那将是非常好的。 我把configuration文件的底部…这个确切的configuration与rails_env development; 但我想使用生产模式;-) 非常感谢您的帮助! 版本:Ubuntu 8.04.2 64bit / nginx-0.7.64(通过乘客编译安装 – 2.2.11) cat /opt/nginx/conf/nginx.conf user www-data; worker_processes 4; error_log logs/error.log; #pid logs/nginx.pid; events { worker_connections 1024; } http { passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11; passenger_ruby /usr/bin/ruby1.8; passenger_log_level 3; include mime.types; default_type application/octet-stream; #log_format main '$remote_addr – $remote_user [$time_local] […]

ubuntu 10.04中的“update-rc.d:/etc/init.d/unicorn_app:文件不存在”

嗨,大家好,我正在尝试configuration独angular兽+ nginx在我的ubunton 10.04 linode部署我的rails应用程序,当我执行命令: sudo update-rc.d unicorn_app defaults 我得到下一个错误: update-rc.d: /etc/init.d/unicorn_app: file does not exist 但是我可以在init.d文件夹中看到unicorn_app文件。 ubuntuterminal中的unicorn_app文件颜色是背景灰色的红色。 我该如何解决这个问题? 谢谢!

致命错误:未find“Redis”类

我使用phpredis扩展在我的ubuntu 14服务器上安装了Redis。 我使用Nginx服务器。 我有phptesting脚本 $redis=new Redis() or die("Cannot load Redis module."); $redis->connect('localhost'); $redis->set('random', rand(5000,6000)); echo $redis->get('random'); 从命令行工作正常,但不是从Web浏览器。 Nginx错误日志: [info] 31102#0: Using 32768KiB of shared memory for push module in /etc/nginx/nginx.conf:82 [error] 31108#0: *21 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'Redis' not found in… 即使在phpinfo()我也看不到 所有安装apt-get安装 所有其他模块(mysql,imagemagick …)工作正常 我已经花了几个小时在谷歌,但没有发现什么有用的

使用NGINX在Ubuntu上安装Subversion,而不是Apache

我使用Ubuntu 10.10,我可以安装Subversion。 我不需要http访问文件,我想使用SSH。 我已经看到关于如何安装Subversion的大部分例子都使用Apache。 我不想在我的服务器上安装Apache,因为我正在使用NGINX。 我可以在不安装Apache的情况下安装Subversion吗? 如果是的话,怎么样? 谢谢!

phusion乘客没有看到环境variables?

我们使用Nginx + Phusion Passenger为我们的rails 3.0x应用程序运行ubuntu服务器。 我在testing机器上的/ etc / environment中设置了一个环境variables: MC_TEST=true 如果我运行一个控制台(bundle exec rails c)并输出ENV [“MC_TEST”],我看到'true'。 但是,如果我把相同的代码放在页面上(<%= ENV [“MC_TEST”]%>),它什么都看不到。 该variables不存在。 这让我质疑: 1 – 使用nginx(不是apache的SetEnv)把环境variables转换成乘客的正确方法是什么? 2 – 为什么乘客没有适当的环境?

Ubuntu服务器安装PHP 7没有Apache

我试图让我的服务器重新设置为一个Lemp堆栈 我现在遇到的问题是安装PHP 7 没有 Apache,因为nGinx将是我的networking服务器。 所以,我已经添加了ppa:ondrej/php 。 运行apt-get update ,并尝试通过apt-get install php7.0 –nodeps标志不起作用,因为我在Ubuntu 15.10上 我得到了: The following extra packages will be installed: apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 libqdbm14 php-common php-readline php7.0 php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline Suggested packages: apache2-doc apache2-suexec-pristine apache2-suexec-custom php-pear php-user-cache The following NEW packages will be installed: […]

PHP启动:无法加载dynamic库(NEW RELIC)

好的,所以在New Relic的人们对此并没有太大的帮助,所以我在这里问你们中的一个好人是否能帮助我:) 我使用Nginx和最新的PHP运行Ubuntu 12.04。 这个故事是这样的:我试图按照Ubuntu的说明安装新的遗迹PHP代理: wget -O – http://download.newrelic.com/548C16BF.gpg | sudo apt-key add – sudo sh -c 'echo "deb http://apt.newrelic.com/debian/ newrelic non-free" > /etc/apt /sources.list.d/newrelic.list' sudo apt-get update sudo apt-get install newrelic-php5 sudo newrelic-install install 它不起作用。 PHP代理完全无法启动之后。 我甚至掀起了一个快速的phpinfo.php页面,看看newrelic模块是否列出,而不是。 于是我search了“New relic .deb”,并遇到了这个页面: https : //docs.newrelic.com/docs/server/server-monitor-installation-ubuntu-and-debian并按照说明操作。 安装全部通过,但代理也不启动。 我喜欢保持我的服务器清洁,所以我决定“好吧,因为它不工作,直到新的文物支持回到我身上,我可以从新鲜开始,我将删除已安装的新的遗物的东西。 所以我再次按照这个链接上的指示。 安装似乎正常工作。 但是,如果我执行命令“ PHP ”,我得到以下错误: root@MYHOSTNAME:/home# php PHP Warning: […]

puma:puma.sock没有这样的文件或目录

我使用可靠的脚本进行服务器设置: playbook.yml 的Gemfile 当我将应用程序部署到服务器时,我在nginx / error.log中看到: 2016/09/30 20:43:07 [crit] 1352#0: *1 connect() to unix:/home/deploy/applications/spa_backend/shared/tmp/sockets/puma.sock failed (2: No such file or directory) while connecting to upstream, client: *, server: , request: "GET / HTTP/1.1", upstream: "http://unix:/home/deploy/applications/spa_backend/shared/tmp/sockets/puma.sock:/", 操作系统:Ubuntu 14.04.5

debugging502错误的网关错误 – Ubuntu,Nginx,Unicorn

我有一个EC2实例,试图运行与Nginx和独angular兽的Rails应用程序。 大约60秒后,我不断收到502错误的网关错误: 这是我在nginx错误日志中得到的: 2017/02/10 18:03:38 [error] 13208#13208:* 1上游过早closures连接,同时从上游读取响应头,客户端:174.25.146.24,服务器:_,请求:“GET / welcome HTTP / 1.1” ,上游:“ http:// unix:/home/rails/myapp/shared/sockets/unicorn.sock:/ welcome ”,主机:“mydomain.com” unicorn.stderr.log E,[2017-02-13T00:58:12.456504#13149] ERROR – :worker = 0 PID:16535 timeout(31s> 30s),E,[2017-02-13T00:58:12.459388#13149] – :收割#工人= 0我,[2017-02-13T00:58:12.459499#13149]信息 – :工人= 0产卵…我,[2017-02-13T00:58:12.461390#16810]信息 – – :worker = 0派生pid = 16810我,[2017-02-13T00:58:12.461829#16810]信息 – :工人= 0准备 nginx.conf user rails; worker_processes auto; pid /run/nginx.pid; events { worker_connections 1024; […]