我试图configurationWordPress与切诺基Web服务器一起工作。 在WordPress中build立的多站点是yyy.com并使用“子域”。 因此,我有像aaa.yyy.com , bbb.yyy.com网站 – 他们都工作得很好。
但是,我有另一个完全不同的域名: abcde.com 。 在WordPress中,设置的子域名为abcde.yyy.com 。 当公共用户访问abcde.com ,无法正确地将其redirect到WordPress子域abcde.yyy.com 。
我如何设置切诺基正确的redirect虚拟域到WordPress? 这意味着,面向公众的域名将是abcde.com但WordPress会希望看到abcde.yyy.com正确返回特定网站的正确内容。
(我试过,它总是被redirect到这样的:“ http://yyy.com/wp-signup.php?new=abcde.com ”)
首先,设置您的DNS以正确指向子域和映射域。
那么,在切诺基…
Create a Source (under Sources) Type: Remote Host Nickname: Cherokee Connection: [the ip and port which can reach Cherokee Web Server]
在WordPress ..(你需要先启用多站点)。
Create the WordPress Site My Sites -> Sites -> (Add New) add the site... Then, go to -> My Sites -> Network Admin -> Sites -> (select site) in Settings, change only these 2 fields: Home: http://abcde.com Fileupload Url: http://abcde.com
然后回到切诺基
Create a new Virtual Server and assign it to your sub-domain, eg. "abcde.yyy.com" This is a PHP Virtual Server, so follow the instructions from Cherokee Help Manual, and test it to make you can get WordPress running. References: http://www.cherokee-project.com/doc/cookbook_php.html http://www.cherokee-project.com/doc/cookbook_wordpress.html
现在,你可以回到WordPress …
Go to site... configure, etc. (set permalinks properly, etc.)
最后回到切诺基…
Create yet another another Virtual Server - this time a HTTP Reverse Proxy server for your mapped domain name Nick: abcde.com Document Root: path to WordPress directory ... in Basics Directory Indexes - empty ... in Rule Management remove all except Default change Handler to HTTP Reverse Proxy, Request -> URL Rewriting Add RegEx: ^/(.*)$ Substition: http://abcde.yyy.com/$1 ... click Add Back-end Servers Balancer -> Round Robin Assign Information Sources Application Server -> "Cherokee" (as an Information Sources)
最后,重新启动切诺基! 而已!