Articles of ubuntu 14.04

Apache无法访问mod_security日志

我有一个无法访问mod-security日志的Apache2服务器: prim@xxxx:~$ apachectl -V AH00526: Syntax error on line 196 of /etc/modsecurity/modsecurity.conf: ModSecurity: Failed to open the audit log file: /var/log/apache2/modsec_audit.log Action '-V' failed. The Apache error log may have more information. prim@xxxx:~$ sudo ls -la /var/log/apache2/modsec_audit.log -rw-rwxrwx 1 root www-data 101792 Oct 22 16:37 /var/log/apache2/modsec_audit.log 我有点困惑,因为每个人(所有者,团体,其他人)都有权打开日志文件。 编辑: prim@xxx:/var/log/unattended-upgrades$ sudo -u www-data touch /var/log/apache2/modsec_audit.log touch: […]

微调Nginx和PHP的FPM

我有一个Ubuntu滴与以下内容: 16GB RAM 8个CPU 我正在运行nginx和PHP FPM,但是我似乎并没有从我的服务器中获得最大的收益。 我的CPU使用率和内存使用率都在10%左右,即使服务器在stream量变得密集时挂起。 nginx摘要: worker_processes:8 worker_connections:6000 epoll已启用 multi_accept开启 启用gzip并保持活动状态 php-fpm总结: 在我的www.conf文件中: 下午:dynamic 下午六点钟 pm.start_servers:75 pm.min_spare_servers:75 pm.max_spare_servers:90 其他一切都使用默认设置。 哦,我的ulimit被设置为99999,PHP的opcache被启用。 是否有任何清单,有人可以通过,以确保他们正在微调nginx和php-fpm充分利用服务器的资源?

如何find导致BADSIG错误的软件包?

当我运行apt-get update它会报告一个针对40976EAF437D05B5的BADSIG。 这是指一个包,还是指的是在我的钥匙圈gpg密钥? 如果我将/var/lib/apt/lists到/var/lib/apt/lists.old并重新运行apt-get ,问题就不存在了。 我怎样才能找出问题所在? # apt-get update … Hit http://ppa.launchpad.net trusty/main Translation-en Fetched 933 B in 1s (765 B/s) W: GPG error: http://apt.fammed.wisc.edu trusty Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <[email protected]> Current status: 0 broken [+0], 0 updates [+0], 605 new [+0].

绑定这个日志查看,Ubuntu 14.04.1

今天我们在Ubuntu 14.04.1上运行Bind Servicing时出现问题 我在/ var / log / syslog文件中find了很多:“named [6131]:error(unexpected RCODE SERVFAIL)resolving”Erros。 一切重新开始后,再次工作,但我想知道什么是根本原因。 有没有其他日志应该/可以看看,执行Syslog文件? 关于史蒂芬

启用UFW时,连接的VPN客户端的SSH连接被阻止

我们有一台Ubuntu服务器运行客户端连接的OpenVPN服务器。 问题是,如果我们在这台服务器上启用UFW,允许传入的VPN连接,VPN客户端就不能在服务器子网中使用SSH计算机。 他们可以ping通,但不能通过SSH连接。 如果我们禁用UFW,它工作得很好。 我们已经尝试了:将OpenVPN子网添加到UFW的允许列表中 – 不起作用将本地子网添加到UFW的允许列表 – 不起作用 任何人有一个build议? UFW状态: To Action From — —— —- 1194 ALLOW Anywhere 1194 (v6) ALLOW Anywhere (v6)

在Ubuntu 14.04上安装Spinnaker的SSL证书错误

我正在尝试在Ubuntu 14.04 VM上安装Spinnaker(使用Halyard),使用这些安装说明 。 运行InstallHalyard.sh脚本后,在输出中看到以下错误: Err https://dl.bintray.com trusty-stable/spinnaker amd64 Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none Err https://dl.bintray.com trusty-stable/spinnaker i386 Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none Ign https://dl.bintray.com trusty-stable/spinnaker Translation-en_CA Ign https://dl.bintray.com trusty-stable/spinnaker Translation-en W: Failed to fetch https://dl.bintray.com/spinnaker-releases/debians/dists/trusty-stable/spinnaker/binary-amd64/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none W: Failed to […]

自动安装使用preesed – grub确认消息问题

我正在使用预定义和kickstart方法的组合来执行自定义的ubuntu 14.04服务器的自动安装。 除了恼人的grub确认信息,一切都很好,如下所示: kickstart文件: #Generated by Kickstart Configurator #platform=AMD64 or Intel EM64T #System language lang en_US #Language modules to install langsupport en_US #System keyboard keyboard us #System mouse mouse #System timezone timezone Asia/Tokyo #Root password rootpw –disabled #Initial user user ubuntu –fullname "ubuntu" –iscrypted –password xxx #Reboot after installation reboot #Use text mode install text […]

更改我的Ubuntu系统的主机名后,Apache2无法正常工作

我更改了我的Ubuntu服务器的主机名(从“Ubuntu-14.04”到“mysitename.com”)。 我也相应地更改了完全合格的域名。 之后,我重新加载我的apache2服务器。 之后,只有默认configuration开始与默认的apache页面一起工作。 我试图添加其他configuration,但他们没有工作。 所以我试图重新安装apache2(起初我打算重新configurationapache2,但没有这样的命令(或者我认为),我只是决定select简单的path – 重新安装)。 但是结果一样。 之后,我试图完全删除apache2。 我删除了其名称中包含“apache”的所有文件,并再次安装了apache2。 现在,当我在控制台中键入“service apache2”时,它甚至不显示任何消息。 我怎样才能恢复apache2,并使其能够识别默认configuration以外的configuration? 谢谢。 更新。 好的,我只是重新安装了Ubuntu。 现在一切正常。

我如何设置apache2上传文件的默认权限?

当我通过php上传文件时,它会以权限644(-rw-r – r–)写入文件。 我有我的/ var / www / html文件夹设置与setgid,以便上传的所有文件被设置为应该被允许显式访问(FTP等)的组。 但是,644权限不允许文件组写入,这是一个问题。 我怎样才能configurationapache2,以便在/ var / www / html文件夹内由www-data创build的所有文件/目录都具有为其设置的权限775(-rwxrwxr-x)? 我使用Apache 2.2在DigitalOcean VM上运行Ubuntu 14.04。

防止TCP连接重新启动服务

在Ubuntu 14.04上,应用程序以每秒1到1次的速度与客户端进行通信。 但是,该服务必须定期重新启动,这会导致所有连接丢失/超时。 服务重启只需要大约10-15秒。 是否有可能调整系统,使得这些连接在服务重启时不超时/丢弃? $ ulimit -n 1048576 $ cat /proc/sys/net/ipv4/tcp_fin_timeout 60 $ cat /proc/sys/net/ipv4/tcp_tw_recycle 0 $ cat /proc/sys/net/ipv4/tcp_tw_reuse 0