Articles of Ubuntu

letsencrypt certbot超时错误

尝试运行该命令时出现这个奇怪的letsencrypt错误 $ certbot certonly –standalone –email example@gmail.com –agree-tos -n -d trumporate.com,www.trumporate.com Saving debug log to /var/log/letsencrypt/letsencrypt.log Obtaining a new certificate Performing the following challenges: tls-sni-01 challenge for trumporate.com tls-sni-01 challenge for www.trumporate.com Waiting for verification… Cleaning up challenges Failed authorization procedure. trumporate.com (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify […]

Ngnix – 写入:当使用Filezilla将文件传输到根目录时,权限被拒绝

我试图通过SFTP将文件与Filezilla传输到我的nginx VPS的根目录(/ usr / share / nginx / www)。 数据传输失败,出现以下错误消息: /usr/share/nginx/www/test.php: open for write: permission denied 我没有使用root用户,但创build了一个sudo权限的用户来访问我的服务器。 我已经尝试使用以下命令为我的用户获取www-data组权限,但是没有成功: sudo newgrp www-data sudo usermod -a -G www-data myuser 任何想法如何获得写权限来传输我的文件?

如何获得Django 1.7的工作在Ubuntu 14.04与Nginx和virtualenv使用Python 2.7而安装了Python 3.4?

我是Django和Python安装的新手。 中级与Ubuntu 14.04。 这些是我的Ubuntu 14.04到目前为止的安装。 apt-get install python3-setuptools –force-yes -y ## for python3 easy_install3 pip ## for python3 apt-get install python-setuptools –force-yes -y ## for python2.7 or above easy_install pip ## for python2.7 or above apt-get install python-dev –force-yes -y ## because ubuntu 14.04 does not have dev version of python 2 apt-get install python3-dev […]

PM2和Nginx:502错误的网关

我一直在尝试在全新的DO液滴上部署我的Node项目,但是我在使用PM2时遇到了一些问题。 我的步骤如下: Node上安装Droplet镜像(Ubuntu,Node v4.4.4) 全球安装PM2 设置Nginx来反向代理127.0.0.1:3000 克隆我的项目,并做了npm安装 我所得到的是Nginx抱怨502坏门。 如果我看看Nginx的error.log我得到这个: connect()失败(111:连接被拒绝),当连接到上游时,client: client.ip ,server: my.server ,request:“GET / HTTP / 1.1”,上游:“ http://127.0.0.1:3000/ “,主持人:” my.server “ PM2没有什么可说的。 pm2日志和状态都不在线 。 我尝试跳过PM2,只是做了npm开始工作完美。 我也尝试设置一个虚拟的Hello World应用程序,并使用PM2 – 它也工作。 所以这是目前我在哪里: 我的项目+ PM2:不起作用。 我的项目没有PM2:工作。 Hello World app + PM2:有效。 我真的不知道该从哪里出发..我可以跳过PM2并使用节点,但我确实需要PM2的function。 有任何想法吗?

在nginx.conf过期会在ubuntu上抛出错误,但在OSX上不会

我的nginx.conf正在处理本地(OSX),但在prod(Ubuntu)上抛出一个错误 完整的文件: https : //github.com/thomasdane/partywave/blob/master/nginx.conf 但相关部分是: # Expires map map $sent_http_content_type $expires { default off; text/html 1w; text/css 1w; application/javascript 1w; ~image/ 1w; } server { listen 80; expires $expires; server_name http://www.partywave.co/; location / { proxy_pass http://127.0.0.1:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } 在我的Mac上,这很好,输出: curl -I […]

configuration/etc/nginx/nginx.confredirect到单独的主机

有谁知道如何修改nginx.conf文件redirect到另一个主机? 我想直接http://mydomain.com/page1和http://mydomain.com/page2分开本地networking上的主机。 mydomain.com/page1应该去10.100.0.163和mydomain.com/page2应该去10.100.0.164。 这是我添加到我的Ubuntu服务器上的nginx.conf文件的HTML部分。 location /page1/ { rewrite ^/page1/(.*)$ http://10.100.0.163/$1 permanent; } location /page2/ { rewrite ^/page2/(.*)$ http://10.100.0.164/$1 permanent; } 还有什么我需要添加到nginx.conf文件? 还有其他configuration文件,我还需要修改? 我只是做了标准的nginx安装,并没有改变任何东西。

nginx子域

好吧,我似乎无法得到它,我检查了nginx论坛,也没有太多的帮助。 我认为这将是简单的。 我想定义的子域名转到不同的url/端口。 即 DNS site.com goes to 192.168.1.1 w/ masking DNS www.site.com goes 192.168.1.1 w/ masking DNS red.site.com goes 192.168.1.1 w/ masking DNS blue.site.com goes to 192.168.1.1 w/ masking 我希望site.com和www.site.com正常运行,但我想red.site.com去192.168.1.2:5000和blue.site.com去192.168.1.2:6000/temp/ 等等等等……我甚至不确定我在意地址栏中显示的是什么,我想如果它保持在red.site.com,它会很好,但这并不重要。 我试过一个代理传递一个URL重写,显然我做错了什么。 这甚至有可能吗?

无法启动Phusion乘客看门狗

嗨,大家好,我需要一些帮助我试图与乘客和Nginx的运行轨和Nginx将不会redirect到我的Rails应用程序,而是继续其默认的index.html页面,我得到这个错误..需要一些帮助不好.. .. 无法启动Phusion Passenger看门狗,因为在启动过程中遇到以下错误:无法在实例registry目录/ tmp中创build子目录:没有这样的文件或目录(errno = 2)(-1:未知错误)

如何在同一台服务器上使用nginx将php和nodejs应用程序一起configuration

我有一个Ubuntu的VPC。 我有一个nodejs应用程序运行在一些文件夹中。 我有一个PHP应用程序运行在Apache / var / www。 我想要的是configurationnginx,以便当用户来到mydomain.com,他/她被redirect到我的节点应用程序运行在端口3000上,当用户访问mydomain.com/docs时,他/她被redirect到我的PHP在端口80上的Apache上运行的应用程序。 server { listen 80; root /var/www; location / { try_files $uri $uri/ /index.html; } location ~\.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location /doc/ { alias /usr/share/doc/; autoindex on; allow 127.0.0.1; deny all; } location ~/\.ht { deny all; } } 我的nodejs应用程序的conf文件是: upstream […]

Nginx处理10k并发连接

我们无法在nginx中处理超过3k个并发请求(Connecton超时)。 我们也将ulimit更改为20000.以下是我的nginx.conf和sysctl.conf文件: user www-data; worker_processes 4; pid /var/run/nginx.pid; events { worker_connections 5000; use epoll; # multi_accept on; } worker_rlimit_nofile 100000; http { sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 600; send_timeout 600; proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; reset_timedout_connection on; types_hash_max_size 2048; client_header_buffer_size 5k; open_file_cache max=10000 inactive=30s; open_file_cache_valid 60s; open_file_cache_min_uses 2; open_file_cache_errors on; include /etc/nginx/mime.types; […]