Articles of ubuntu 14.04

postqueue:fatal:无法刷新邮件队列 – 邮件系统已closures

设置一个服务器,我有最后的时间让后缀发送电子邮件! 我有几个电子邮件在队列中,但是当我强迫他们,我得到这个: postqueue: warning: unable to look up public/qmgr: No such file or directory postqueue: fatal: Cannot flush mail queue – mail system is down 我错过了什么?

如何显示init输出到tty7(或主tty)

我已经在linux服务器上创build了我的第一个初始化脚本(如果添加了任何信息的话,ubuntu会检查更新,下载并在每个小时执行一次)。 init文件如下: /etc/init/updater.conf start on (filesystem and stopped udevtrigger) stop on runlevel [06] console output respawn script chvt 6 chvt 7 while true; do # code to check update … if [ should_update ]; then # Download the script chmod +x /path/to/script.sh bash /path/to/script.sh rm /path/to/script.sh fi echo 'Rechecking for updates in 1h…' sleep 1h […]

Nginx的 – 如何检查一个位置的传入请求是否包含一组头文件?

我是服务器的新手。 最近我用Nginxconfiguration了一台服务器,并发现所有的工作正常。 现在我需要检查包含所有自定义标题的位置的请求。 我只需要检查标题名称,不必担心值。 我已经尝试过使用map指令,但似乎我需要为每个标题(将下面的代码粘贴)编写它。 map $http_custom_header $headerfound { default "access-denied"; Test "access-granted"; } 有什么方法可以一次捕获所有的头文件,并检查一组头文件名吗?

Laravel的子目录 – Nginx和fastcgiconfiguration

我试图在我的nginx服务器hhvm上设置各种设备的应用程序,但经过大量的研究和许多尝试都无法成功。 有人可以帮我吗? 这是我目前的设置: server { listen 80; server_name 178.13.1.230; root /home/callcenter/public_html/gateway; location / { index index.html index.php; } location /crm { root /home/callcenter/public_html/gateway/crm/public; #rewrite ^/crm/(.*)$ /$1 break; index index.php index.html; try_files $uri $uri/ /index.php$is_args$args /index.php?$query_string; } location ~ /crm/.+\.php$ { root /home/callcenter/public_html/gateway/crm/public; #rewrite ^/crm/(.*)$ /$1 break; include /etc/nginx/fastcgi.conf; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_index index.php; include /etc/nginx/hhvm; […]

从非pipe理员用户重新启动服务

我编写我的C ++程序,并通过在/ etc / init / 所以我的程序在重启后自动启动,可以使用sudo service my-service restart进行控制 如何允许从另一个非pipe理员用户(即jenkins集成服务器)重新启动此服务? 目前如果我的jenkins运行脚本 service my-service start 它给了我一个错误:我的服务:无法识别的服务

Nginx提供静态PHP文件

虽然试图实现缓慢的Wordpress网站的一些caching – 我已经在NGINX级别启用cachig。 然而,它似乎是坚持一个渲染文件,并不想放弃。 这不是在caching中,我试着恢复一切,禁用SendFileclosures,但Nginx仍然希望从5天前提供一个陈旧的文件。 我已经删除了Nginx,重新安装它,重新构build它,没有任何东西。 有什么想法吗? user www-data; worker_processes 4; pid /run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile off; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # Logging Settings […]

为什么主机以前的真实性被忽略?

我在Ubuntu 14.04桌面上。 我刚刚login到其他机器(Ubuntu 14.04服务器)使用ssh在一个terminal。 我仍然连接。 当我在另一个terminal(前面打开)中执行scp将文件移动到同一台机器时,它显示: 主机“…”的真实性无法build立。 ECDSA密钥指纹是(…)。 你确定要继续连接(是/否)吗? 是 每当我第一次连接到不同的机器时,我都会看到这一点。 为什么现在呢? (我每天都在那里连接。)DHCPconfiguration中的东西改变了,可能是一些networking重新安排? 虽然知识产权没有改变,也没有密码,因为我做了成功的SCP。 如果发生了一些configuration更改,是在ssh和scp之间的几秒钟? 或者ssh使用不同的指纹系统? 或者也许有人使用我的电脑,并加扰以前保存的ECDSA密钥指纹? 编辑: 现在我去了物理服务器,改变了语言环境(试图用名称中的中文字符来改变一些文件)。 语言环境已更改,但仍未显示正确的字符。 但是,我能够重命名这些文件来清除汉字。 现在,我无法使用来自同一机构中其他计算机的浏览器连接到服务器,就像我以前所做的(服务器只能在机构内部可见)。 我认为语言环境与它无关,但是改变我之前的真实性证书的相同事件必须隐藏服务器从networking。

与Tomcat的Apache2 mod_proxy_ajp导致500内部服务器错误

我目前正在部署运行Ubuntu 14.04的云服务器实例。 我已经安装了LAMP堆栈以及Tomcat 7服务器。 我想从这个服务器运行一个基于Java的应用程序,因此任何请求到我的服务器,即www.example.com/app,应该加载我的应用程序。 但是,现在已经有10个小时了,我仍然收到500个内部服务器错误。 位于/etc/apache2/sites-available/000-default.conf中的默认虚拟主机文件是: <VirtualHost *:80> ServerName example.com ServerAlias www.example.com ServerAdmin user@postmaster DocumentRoot /var/www/html <Proxy *> Require all granted AddDefaultCharset Off Order deny,allow Allow from all </Proxy> ProxyRequests Off ProxyPass /app ajp://localhost:8009/app/ ProxyPassReverse /app ajp://localhost:8009/app/ ErrorLog /var/log/apache2/ajp.error.log CustomLog /var/log/apache2/ajp.log combined </VirtualHost> 当我直接到我的应用程序example.com:8080显示正常。 我错过了什么吗? 我读了很多,我必须启用代理和proxy_http,我可以确认他们都加载。 我错过了什么吗? 这可能是一个权限问题? 我希望这有助于知道我从二进制安装Tomcat,而不是使用aptitude。 我觉得这样pipe理更容易。 我是Linux服务器pipe理的新手,我感谢任何人的帮助。 谢谢!

取决于:gcc-4.9-base(= 4.9.1-16ubuntu6),但没有安装

当我尝试在我的Ubuntu 14.04上安装php5-curl时,我遇到了这个问题。 我跑了: sudo apt-get install php5-curl得到: Reading package lists… Done Building dependency tree Reading state information… Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: cpp-4.9 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed g++-4.9 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) […]

ICMP ECHO REPLY没有被正确的SNAT

我正在尝试使用OpenVPN在两个远程LANnetworking(10.0.0.0/24,10.0.1.0/24)之间提供L3连接,并使用以下设置: +—————-+ +———————+ +———————+ |VM A | |VM B (OpenVPN Server)| |VM C (OpenVPN Client)| |eth0:10.0.0.5/24|–|eth0:10.0.0.4/24 | |eth0:10.0.1.4/24 | +—————-+ |tun0:10.8.0.1/32 |==|tun0:10.8.0.2/32 | +———————+ +———————+ 提供以下IP表规则: iptables -t nat -A POSTROUTING -o eth0 -j SNAT –to-source 10.0.0.4 Pinging VMC-> VMA(10.0.0.5)在VM B上,ICMP回显请求的IP被正确的SNAT: VM-B# tcpdump -i eth0 icmp 09:27:36.170555 IP 10.0.0.4 > 10.0.0.5: ICMP echo request, id […]