我有一个centos 6.5 web服务器运行2个网站closures1 ip地址通过使用虚拟主机。 domain1.com和domain2.com – 都托pipe在上面的同一个Web服务器上。 我需要将约40页从domain1redirect到domain2,“例如”: domain1.com/page1 -> domain2.com/new-page-1 domain1.com/welcomepage -> domain2.com/new-welcome-page domain1.com/johnsmith -> domain2.com/elvis domain1.com/test -> domain2.com/production *请注意,我正在redirect的页面不在同一个结构/名称下,而是转到完全不同的结构/名称。 任何人都可以build议我可以/需要做什么来完成这项任务? 编辑#1我试图通过我的httpd.conf文件中的VirtualHost部分。 请参阅下面的参赛作品。 <VirtualHost *:80> ServerName domain1.com ServerAlias www.domain1.com RedirectPermanent / http://www.domain2.com/page12345/ </VirtualHost> <VirtualHost *:80> ServerName domain1.com ServerAlias www.domain1.com RedirectPermanent /AboutUs/Founders http://www.domain2.com/about-us-founders/ </VirtualHost> 在上面的两个条目中,只有第一个条目正确地工作并redirect。 第二个是redirect到: http : //www.domain2.com/page12345/AboutUs/Founders有什么想法?
想要远程访问MYSQL数据库,但是在检查yougetsignal(dot)com时,我得到一个消息,说明3306端口是closures的。 configuration:新鲜的服务器(安装了Zpanel的Centos 6.4 64位) 已经采取的步骤: 从my.cnf中删除绑定地址 尝试添加绑定地址作为服务器IP 编辑了IPTABLES以保持端口打开。 从路由器转发端口 在/etc/my.cnf中添加port = 3306 停止IPTABLES 每次更改后重新启动一次mysqld 更改后重新启动IPTABLES 到目前为止没有任何工作。 IP表: # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j […]
我有一个Postfix的configuration问题,让我头脑痒痒的几天,我正在向你伸出援助之手,找出问题所在,请在我解释我的设置的同时裸露在身上。 我有一个服务器上设置了Postfix多实例,每个实例都有自己的IP: 实例1:example.com(具有用于反弹/ fbl临时处理的邮箱的根域) 实例2:unsub.eg.example.com(具有用于未处理的邮箱的子域) 实例3:out1.eg.example.com(仅限出站) 实例4:out2.eg.example.com(仅限出站) 一切工作正常发送电子邮件,或接收域名unsub.eg.example.com电子邮件。 但是,发送电子邮件到[email protected]或[email protected]时,这四个实例中的任何一个都可以处理它,而不仅仅是example.com实例。 当由unsub,out1或out2select时,NOQUEUE:拒绝:RCPT来自:554 5.7.1:中继访问被拒绝; 错误由处理实例logging。 如果实例1碰巧拾起它,它被传递到邮箱没有问题。 因此,为什么其他实例正在挑选一个绑定到example.com的电子邮件呢? 以下是main.cf对于实例的高亮configuration,我认为这可能会导致问题: smtp.example.com queue_directory = /var/spool/postfix-smtp command_directory=/usr/sbin daemon_directory=/usr/libexec/postfix data_directory=/var/lib/postfix-smtp mail_owner=postfix syslog_name=pfix-smtp myhostname=smtp.example.com mydomain=example.com myorigin=$mydomain inet_interfaces=$myhostname inet_protocols=ipv4 mydestination=localhost mynetworks_style=host relay_domains= relayhost= home_mailbox=Maildir/ disable_vrfy_command=yes virtual_mailbox_domains=$mydomain virtual_mailbox_maps=hash:/etc/postfix/vmailbox smtpd_sasl_auth_enable=yes broken_sasl_auth_clients=yes smtpd_sasl_type=dovecot smtpd_sasl_path=private/auth smtpd_sasl_security_options=noanonymous smtpd_recipients_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_sender_restrictions=reject_unknown_sender_domain smtpd_sasl_local_domain local_recipient_maps=$alias_maps,$virtual_mailbox_maps unsub.eg.example.com queue_directory = /var/spool/postfix-unsub command_directory=/usr/sbin […]
在CentOS 6.5中,我会为用户设置sudo, useradd -G wheel -c“John Smith”jsmith visudo命令 取消注释此行 – %wheel ALL =(ALL)ALL usermod -G wheel -a jsmith 重启sshd – /etc/init.d/sshd restart sshlogin为jsmith并input“sudo bash” 当我在CentOS 7中尝试相同的东西时,我在/ var / log / secure中看到以下内容 – Oct 8 05:20:00 localhost sudo: jsmith : user NOT in sudoers ; TTY=pts/1 ; PWD=/home/jsmith ; USER=root ; COMMAND=/bin/bash 这个程序不再适用于CentOS-7吗? 更多信息 – 文件/ […]
像许多人(我希望),我正在准备木偶4我的清单分离出来的环境。 我打算有3个不同的环境:qa,staging,prod。 在最初设置清单时,我已经为环境设置了一个自定义的事实来指向特定的环境(即创build/etc/facter/facts.d/environment来设置环境)。 当我使用一个打印出$ environmentvariables的单个清单运行testing时,它给了我自定义事实的价值,但是当代理与Puppet Master交谈时,它仍然使用默认环境“production”。 任何想法为什么发生这种情况? 是不是可以用作ENC?
在centOS 5有无论如何重置/ proc / net / dev计数? 而不是重新启动服务器或重新加载NIC驱动程序? 我正在使用e1000e驱动程序相同。
有没有办法删除或replaceRPM上现有的GPG签名? 我在一个我们用于补充rhel / centos软件包的内部存储库上放置了一些晦涩的RPM。 其中一些RPM已经签名。 我想删除这些签名,并用我们用于本地回购的GPG签名辞职。
在shell中服务器启动几个命令后,我看到以下错误: Error: nmcli (1.0.0) and NetworkManager (0.9.9.1) versions don't match. Force execution using –nocheck, but the results are unpredictable 我发现有更新版本的NetworkManager。 我如何更新它? 我试过yum update NetworkManager没有成功 我使用CentOS Linux release 7.1.1503 (Core)
我在CentOS 7服务器上有几个IPv6地址,需要将一个特定的v6地址作为路由中使用的默认地址。 我已经能够通过修改路由表来做到这一点。 ip -6 route del default ip -6 route add default via 2001:470:xxxx:xx::1 src 2001:470:xxxx:xx::6 问题是每当networking接口重新启动或服务器本身重新启动时,对默认IPv6路由的更改就会丢失。 我怎样才能使这种变化持久,以便永久保存?
我正在使用AWS MarketPlace的这个图像 。 问题是,centos 7应该是用firewalld而不是iptables来的。 但是firewalld没有安装,但安装了iptables 。 这是为什么。 还有什么其他的变化,这个特定的图像,这是centos提供的,应该是在常规的7个图像上。