Articles of Debian

如何强制httpd使用较新的PHP / PHP-CGI

嗨,所以我有问题在Debian Wheezy服务器上更改PHP版本。 这是之前的Debian Squeeze与PHP 5.2.17,我做了一个远程升级,并升级所有相关的PHP(PHP 5.6.30)。 "which php" command gives: /usr/local/bin/php 在那个path下有php和php-cgi的可执行文件,其中“-v”为5.6.30 php -v php5 -v php-cgi -v also gives PHP 5.6.30 唯一的path是/ usr / local / php5 / bin,因为在那个文件夹中./php提供了5.2.17版本,并且httpd正在使用相同的版本。 我试图简单地更换可执行文件,但它给内部服务器错误。 我已经尝试apt-get删除任何PHP相关,并重新安装php5,但它也不会工作。 这个服务器上有很多奇怪的configuration,涉及很多VirtualHosts和httpd(不知道,但是/etc/init.d/apache2 start / stop不起作用,只有/etc/init.d/httpd start / stop。我无法真正改变这一切,因为我无法从头开始configuration整个事情。 任何想法如何强制httpd使用php-cgi 5.6.30而不是这个5.2.17旧的东西? 的phpinfo(); 返回使用CGI / FastCGI。

MTA打破服务器的重启

重新启动后,系统无法恢复在线状态 我已经尝试了几次重新启动,但它总是停在这里..屏幕已经是这样的30分钟,所以我不认为它会永远不会超过这个 如何解决? 我可以在救援模式下访问服务器..是否有可能完全禁用MTA启动时以一种简单的方式? 或者排除故障并解决问题的方法? 最重要的是服务器恢复在线:) 更新

在nginx中处理default_server和public ip的最佳实践

我最近在debian 8上创build了一个nginx服务器。它在/ etc / nginx / sites-available / default中提供了一个默认configuration,它被redirect到一个nginx的欢迎页面。 server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.php index.html index.htm index.nginx-debian.html; server_name your_server_ip; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; } location ~ /\.ht { deny all; } } 我已经添加了一个新的生产页面,用'ssl'来说'example.com'。 在../example.com的configuration中,它没有被设置为默认服务器。 server { […]

Nutch抱怨Java 8版本不匹配,但只安装了Java 7

我正在关注https://wiki.apache.org/nutch/NutchTutorial中的Nutch教程 我从Apache站点获得Solr 5.5.4,从Apache站点获得Nutch 1.13 我正在使用Oracle Java 7,我首先尝试了openjdk-7并得到了相同的错误(下面) 我按照教程,到达我运行bin / inject的步骤,并且得到一个exception'Unsupported major.minor version 52.0' – 我相信它是Java 8.我的系统上没有安装Java 8,这是一个新鲜的debian安装。 (下面的完整的错误信息) 我如何解决这个错误? user@Nutch-1:~/apache-nutch-1.13$ bin/nutch inject crawl/crawldb urls Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/nutch/crawl/Injector : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) […]

在Debian上configuration传出IP地址

我有一个由ovh.com托pipe的VPS,并添加了一个新的IP地址。 第一个是51.254.117.162 我添加的是46.105.47.86 我在互联网上search了很多,但我找不到一种方法来设置我的VPS,使传出的stream量使用第二个IP地址。 我使用Debian 8(Jessie)。 这是我的/ etc / network / interfaces文件: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 allow-hotplug […]

邮件在Debian中无效

所以我试图在PHP中启动mail()函数,所以我安装了邮件(mailutilities)包到我的debian服务器。 当我试图发送电子邮件时,我不明白。 这是什么日志说: May 23 22:22:50 raspberrypi sm-msp-queue[1299]: My unqualified host name (raspberrypi) unknown; sleeping for retry May 23 22:23:16 raspberrypi sendmail[1530]: My unqualified host name (raspberrypi) unknown; sleeping for retry May 23 22:23:59 raspberrypi sm-mta[819]: unable to qualify my own domain name (raspberrypi) — using short name May 23 22:23:59 raspberrypi sm-mta[1534]: starting daemon […]

将HTTPSredirect到特定目录中的HTTP

我想在HTTP中提供customers_api (directory) 。 检查下面我目前的default.conf(我使用Nginx和Centos 7)。 我试过了我在这里find的所有例子,而不是工作。 server { listen 443 ssl http2; listen [::]:443 ssl http2; gzip off; root /usr/share/nginx/html; index index.php index.html index.htm; server_name example.org; location / { try_files $uri $uri/ =404; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ \.php$ { root […]

与多个桥梁的Xen

我有以下设置的一些问题: Debian Stretch(冻结testing)作为dom0。 我configuration了thre桥(xenbr0,xenbr1,xenbr2)/ etc / network / interfaces看起来像这样: auto xenbr0 allow-hotplug xenbr0 iface xenbr0 inet static bridge_ports eth0 address $Host_Ip broadcast $Broadcast netmask 255.255.255.0 gateway $Gateway bridge_stp off bridge_waitport 0 bridge_fd 0 auto xenbr1 allow-hotplug xenbr1 iface xenbr1 inet manual pre-up brctl addbr $IFACE up ip link set $IFACE up post-down brctl delbr $IFACE […]

后缀白名单上的IP仍然被阻止

由于特定的IP往往是黑名单提供商,我必须把这个IP放在白名单上,因为有太多的误报。 我前一段时间configuration了它,我是一个Windowspipe理员 – 所以我不再那个新主题了,需要帮助。 问题是白名单IP仍然被bl.spamcop.net阻止。 我想你需要configuration的重要内容: smtpd_recipient_restrictions = check_sender_access哈希:/等/后缀/ blockedSender smtpd_client_restrictions = check_client_access哈希:/等/后缀/ IPWhitelist smtpd_relay_restrictions = reject_unknown_reverse_client_hostname reject_unknown_sender_domain permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_rbl_client zen.spamhaus.org reject_rbl_client bl.spamcop.net reject_rbl_client psbl.surriel.com 什么是不明白的:是否postfix仍然处理其他事情,如中继和收件人的限制即使我把IP放在白名单(没有意义,因为它是白名单,不需要进一步的testing)?

每秒有数百个条目的Auth.log

由于来自许多不同IP的不断input,我的validation日志变得超级重(每个文件80G)。 Jun 20 14:00:36 localhost pluto[1796]: packet from 180.30.141.75:20532: Received packet with mangled IKE header – dropped Jun 20 14:00:36 localhost pluto[1796]: packet from 217.7.68.178:33733: not enough room in input packet for ISAKMP Message (remain=26, sd->size=28) Jun 20 14:00:36 localhost pluto[1796]: packet from 217.7.68.178:33733: Received packet with mangled IKE header – dropped Jun 20 14:00:36 […]