Articles of Ubuntu

fastcgi单声道套接字(nginx:拒绝访问)

我有一个Ubuntu的(13.04)/ Nginx的/单声道设置。 它的工作原理是当我设置fastcgi-mono-server4上的套接字到TCP,但是我想使用套接字。 我用启动时运行的这个脚本启动它: #!/bin/sh ### BEGIN INIT INFO # Provides: monoserve.sh # Required-Start: $local_fs $syslog $remote_fs # Required-Stop: $local_fs $syslog $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start fastcgi mono server with hosts ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/mono NAME=monoserver DESC=monoserver MONOSERVER=$(which fastcgi-mono-server4) MONOSERVER_PID=$(ps auxf | grep […]

Nginx的logrotate不能在亚马逊服务器上工作

我是服务器端的新手。我在我的服务器(Amazon EC2 32位实例)上安装了Nginx来运行我的Ruby on Rails应用程序。我已经为我的nginx logrotate写了下面的configuration。 /var/log/nginx/*.log { daily missingok rotate 12 compress delaycompress notifempty create 0640 www-data adm sharedscripts prerotate if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ run-parts /etc/logrotate.d/httpd-prerotate; \ fi; \ endscript postrotate [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid` endscript } 但问题是,尽pipe旋转间隔保持每天..有一个文件(Nginx的访问日志),这是在大约4.5 Gb生成的。我不知道为什么会发生这种情况,任何人都可以告诉我我可以做什么为了避免这个。可以有人请帮我这个。

Vagrant + Ubuntu 14.04 + Nginx + HHVM =缓慢+崩溃

根据我最后一个问题 ,我试图通过在HHVM下运行来加速Laravel。 这需要我更新我的服务器到64位,所以我现在运行Trusty64。 我通过deb包安装了HHVM和Nginx。 我不完全确定我的nginxconfiguration是否正确,我把它从网上刮掉了: server { listen 80 default_server; root /vagrant/public; index index.php index.html index.htm; server_name localhost; access_log /var/log/nginx/localhost.laravel-access.log; error_log /var/log/nginx/locahost.laravel-error.log error; charset utf-8; location / { try_files \$uri \$uri/ /index.php?\$query_string; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { log_not_found off; access_log off; } error_page 404 /index.php; include […]

来自Ubuntu 14.04的NGINX 1.4.7与最新版本的NGINX 1.8.0

我注意到,在Ubuntu 14.04中的NGINX的标准版本与NGINX 网站上的(!stable)版本相比是相当老的,目前这个版本是1.8.0。 为什么有这么大的差别? 是否build议手动更新到生产Web服务器上的最新稳定版本的nginx? 我希望得到SPDY 3.1以提高加载时间。 这是值得的努力?

nginx提供一些(但不是全部)的php文件作为下载

我正在运行nginx的Ubuntu服务器上安装Wordpress。 安装过程非常顺利(下面安装LEMP和安装Wordpress教程 – 带我通过mysql,php5-fpm和wordpress安装程序),似乎主要工作。 我可以查看WordPress的pipe理页面,创build博客post,甚至查看这些post。 但是当我尝试访问我的博客的主页(例如index.php)时,nginx将该文件作为下载而不是执行它。 我已经尝试过Nginx的configuration服务.php文件作为下载,而不是执行它们无济于事。 这是我的虚拟服务器文件: server { listen 80; server_name my.domain.com; root /my/wordpress/home/dir; index index.php index.html index.htm; location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location / { try_files $uri $uri/ /index.php?$args; rewrite ^/([_0-9a-zA-Z-]+/)?wp-admin$ /$1wp-admin/ redirect; if (-e $request_filename) { rewrite […]

uWSGIconfiguration错误'core / socket.c' – w / Django&NGINX

我正在使用NGINX&uWSGI在Ubuntu 14.04(Digital Ocean Droplet)上build立一个Django站点(下面的这个教程没有做第二个项目)。 我可以用manage.py运行我的Django站点。 我也可以运行uwsgi –http :8080 –home /home/andrew/Env/personalsitevenv –chdir /home/andrew/andrew-django-personal-site/personalsite -w personalsite.wsgi没有任何问题。 我可以看到我的网站在我的IP:端口上运行。 我也可以运行uwsgi –http :8000 –module personalsite.wsgi –virtualenv /home/andrew/Env/personalsitevenv没有问题。 当我去我的服务器的IP,所有我看到的是Welcome to nginx! 页。 没有任何NGINX日志错误& sudo service nginx configtest是干净的。 我得到的唯一信息是在我为uWSGI设置的日志文件中,其中包含: *** Starting uWSGI 2.0.12 (64bit) on [Fri Jul 8 00:41:22 2016] *** compiled with version: 4.8.4 on 05 July 2016 17:45:39 os: Linux-4.4.0-28-generic […]

uwsgi套接字未创build

我正在使用nginx和uwsgi设置一个ubuntu服务器。 昨天跑步 sudo service nginx restart和sudo service uwsgi restart 会生成这个套接字: /run/uwsgi/app/recoapi/recoapi.socket 我使用pip而不是apt-get来安装uwsgi ,并且从那时起, recoapi.socket文件还没有被生成。 当我尝试curl我的服务器时,在我的nginx error.log发现以下错误。 2013/09/01 13:59:12 [crit] 29712#0: *1 connect() to unix:///run/uwsgi/app/recoapi/recoapi.socket failed (2: No such file or directory) while connecting to upstream 这个错误的结果是我的curl的输出是 <html> <head><title>502 Bad Gateway</title></head> <body bgcolor="white"> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx/1.2.6 (Ubuntu)</center> </body> </html> 我的uwsgiconfiguration文件看起来像这样。 有关套接字权限的行似乎没有效果。 <uwsgi> <plugin>python</plugin> <uid>www-data</uid> <gid>www-data</gid> […]

使用SSL的NGINXshiny服务器

我在Ubuntu 12.04 64位系统上安装了Shiny Server,R'shiny'包v7.0,NGINX和第三方SSL证书。 在使用http时,一切正常,但是在使用NGINX设置SSL反向代理之后,server.R文件停止工作 – 我没有看到任何事情发生。 我只看到从ui.R输出,没有错误,但没有从server.R结果。 看起来客户端和服务器之间没有通信。 我在Win 12,Google Chrome和Chromium上使用了IE8和Google Chrome。 同样的问题。 有趣的是,使用iPad时,它工作正常 。 请帮忙。 谢谢 ================================================== ============ Shiny Server v0.3.6(Node.js v0.10.21) sessionInfo()R版本3.0.2(2013-09-25)平台:x86_64-pc-linux-gnu(64位) 附加的基础软件包:[1] stats graphics grDevices utils datasets methods base 其他附件包:[1] shiny_0.7.0 通过命名空间加载(并未附加):[1] bitops_1.0-5 caTools_1.14 digest_0.6.3 httpuv_1.2.0 RJSONIO_1.0-3 [6] xtable_1.7-1 这是Shiny-Server的日志: ^ [[32m [2013-11-12 03:53:43.571] [INFO] shiny-server – ^ [[39mStopping listener on […]

在使用RVM时为Ruby创build符号链接

我正在关注这个https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-passenger-and-nginx-on-ubuntu-14-04 但是我已经使用RVM安装了Ruby,因为它容易维护Ruby。 我正在创build一个符号链接的ruby,在这个指南下说 sudo rm /usr/bin/ruby sudo ln -s /usr/local/bin/ruby /usr/bin/ruby 但是,因为我已经使用RVM,而我运行which ruby我得到以下path root@99atoms-staging:~# which ruby /usr/local/rvm/rubies/ruby-2.2.0/bin/ruby

Django主pipeFATAl太快退出如何改进?

我在django使用主pipe我的上司得到错误。 我的服务器在Ubuntu 16.04.2 x64我使用,nginx,gunicortn,主pipe,postgresql。 FATAl Exited too quickly (process log may have details) 。 如果你有一些想法如何解决这个问题,请让我知道你的想法 这是我的主pipe文件。 [program:chart_app] command = /webapps/chart_app/bin/gunicorn_start user = chart stdout_logfile = /webapps/chart_app/logs/gunicorn_supervisor.log redirect_stderr = true environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8 日志中的错误 > supervisor: couldn't exec /webapps/chart_app/bin/gunicorn_start: > ENOEXEC supervisor: child process was not spawned supervisor: couldn't > exec /webapps/chart_app/bin/gunicorn_start: ENOEXEC supervisor: child > process was […]