Articles of ubuntu 12.04

EC2 NGINX 301永久移动

我在DNS Made Easy上pipe理两个域domainA.com和domainB.com 。 两个域指向相同的EC2实例。 domainA拥有一个www.domainA.com到domainA.com的HTTPredirectlogging,该logging被删除,并由www.domainA.com到domainA.com的CNAMElogging取代。 domainB.com拥有www.domainB.com到domainB.com的CNAMElogging。 当我去http://domainB.com页面加载正确,但是当我去http://www.domainB.com我redirect到https://www.domainA.com ,注意到安全协议在这里! 我首先想到的是, domainA.com的HTTPredirectlogging被caching,但DNS Made Easy的人指出,执行$ curl -I http://www.domainB.com返回: HTTP/1.1 301 Moved Permanently Content-Type: application/x-msdownload Connection: keep-alive Status: 301 Moved Permanently Location: https://domainA.com/ X-Powered-By: Phusion Passenger 4.0.53 Date: Fri, 08 Jan 2016 19:21:41 GMT Server: nginx/1.6.2 + Phusion Passenger 4.0.53 所以我查看了NGINX的sites-available目录中的domainA.com和domainB.com上configuration的任何HTTPredirect domainA看起来像这样: server { listen 80; listen 443 […]

转发已知IP地址的自定义页面规则

我想添加一些IP地址到黑名单,我想在黑名单中显示一个自定义的网页,其中包括一个“你在黑名单”消息正文。 我怎样才能做到这一点? 我有Ubuntu的服务器和Apache。 我试图添加规则到IP表,但它只能删除连接。 我不想放弃连接,我想将它路由到一个自定义.html。 谢谢。

Apache2通配证书www和非www域名的麻烦

我的SSL遇到了一些问题。 我有Digicert的CA签名通配证书。 我已经正确安装了它,并试图通过https访问我的网站comp.org和www.comp.org。 https://www.comp.org工作得很好。 但是,当我尝试直接访问https://comp.org时 ,我在google chrome上收到了一个connection_timed_out错误。 为了validation我的证书确实是通配符,我运行了命令: openssl x509 -in /root/comp.crt -noout -text | grep Subject: 我的结果如下: Subject: C=US, L=Town, ST=State, O=Comp, Inc., CN=*.comp.org 据我的理解,我应该可以访问comp.org和www.comp.org这个,对吧? 但是,只有www.comp.org正在为我工​​作。 我最好的猜测是,这与我设置虚拟主机的方式有关。 目前,我在default-ssl中的设置是: <VirtualHost *:443> ServerAdmin webmaster@localhost ServerName *.comp.org DocumentRoot /var/www/ #All the rest of that SSLEngine jazz 要清楚,我不想做非www到wwwredirect。 我知道这种方法是一种可行的解决方法,但是我想将其作为一种学习体验,以便更好地理解虚拟主机和SSL证书的工作方式,因为我对这一切都相当陌生。 因此,我希望我的客户能够访问comp.org和www.comp.org。 顺便说一句,这两个网站显示相同的内容,所以我不需要指定不同的path或类似的东西在虚拟主机。 试图在这里学习。

libapache2-mod-passenger更新可以中断redmine

在Ubuntu 12.04服务器上进行安全更新之后,redmine 2.5被破坏(错误500)。 我们意识到libapache2-mod-passenger是从那里更新的 libapache2-mod-passenger=2.2.11debian-2 至 libapache2-mod-passenger=2.2.11debian-2+deb6u1ubuntu12.04.1 降级这个包再次解决了这个问题。 我能做些什么来避免遇到与下一个安全更新相同的问题?

为什么nginx开始出现?

PS显示nginx早在服务器启动时就开始了。 比如跑步 ps -e -o pid,user,etime,args 说明: 1136 root 09:50 / usr / sbin / sshd -D 1147根09:50 cron 1162 root 09:50 nginx:主进程/ usr / sbin / nginx -g守护进程; master_process on; … 1248 pgb 09:43 / usr / sbin / pgbouncer -d /var/local/pgbouncer/pgbouncer.ini … 1436 root 09:31 / usr / sbin / apache2 -k start […]

如何使用内核服务器和客户端创buildNFS代理?

我有一个文件服务器,导出为NFS。 在Ubuntu机器上,我装载它,然后尝试将其导出为NFS卷。 当我去出口时,我得到的消息是: exportfs: /test/nfs-mount-point does not support NFS export 我怎样才能使这个工作,或者至less得到更多的信息,问题是什么? 准确步骤: Ubuntu 12.04 mount -f nfs myfileserver.com:/server-dir /test/nfs-mount-point [工作正常,我可以读写文件] /etc/exports包含: /test/nfs-mount-point *(rw,no_subtree_check) sudo /etc/init.d/nfs-kernel-server restart * Stopping NFS kernel daemon [ OK ] * Unexporting directories for NFS kernel daemon… [ OK ] * Exporting directories for NFS kernel daemon… exportfs: /test/nfs-mount-point does not […]

从10.04升级到Ubuntu 12.04,并且必须将数据库从Postgresql 8.4传输到9.1

我从10.04升级了一个Rails应用程序到Ubuntu 12.04的服务器,现在无法连接到Postgresql数据库… 这是来自Rails应用程序的错误消息: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432" 另外, pg_ctl start不被识别为一个命令。 编辑 : 原来我的数据库在Postgresl 8.4 ,我的服务器现在在9.1上运行。 所以所有的数据库文件/configuration在8.4 .. 我怎样才能转移他们? 只是从旧的pg_hba.conf直接复制?

Ubuntu 12.04对nmap的慢速回复

我们已经把我们的一些服务器升级到了12.04,我注意到当我从其他服务器上运行nmap来检查这些12.04服务器上的开放端口时,它比以前花的时间更长。 这是一个已知的问题?

在启动时,cifs装载错误的uid,gid

我有一个服务器运行一个samba实例,我用cif访问。 当系统启动文件夹被安装,但与错误的用户界面和gid。 当我umuont和手动安装,uid和gid设置正确(根据我的凭据文件)。 这里是相关的fstab: // arkansas-1 / data / / home / me / dataArk cifs defaults,users,credentials = / home / me / .cred 感谢您的build议!

使用NGiNX在Ubuntu上安装PHP-FPM(PHP 5.4)

这是CMD: pecl install apc 结果: downloading APC-3.1.9.tgz … Starting to download APC-3.1.9.tgz (155,540 bytes) ……………………………done: 155,540 bytes 54 source files, building running: phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this […]