1

I'm trying to configure WordPress to work with Cherokee Web Server. The multi-site set up in WordPress is yyy.com and uses 'sub-domains'. Thus, I have sites like aaa.yyy.com, bbb.yyy.com - they all work fine so far.

However, I have another completely different domain: abcde.com. Within WordPress, the sub-domain set up is abcde.yyy.com. When a public user accesses abcde.com, it cannot properly be redirected to the WordPress sub-domain abcde.yyy.com.

How do I set up Cherokee to properly redirect virtual domains to WordPress? That means, the domain facing public would be abcde.com but WordPress would want to see abcde.yyy.com to properly return the correct content for the specific site.

(I tried and it always get redirected to something like this: "http://yyy.com/wp-signup.php?new=abcde.com")

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
ikevin8me
  • 137
  • 1
  • 6

1 Answers1

0

First, set up your DNS to point both the sub-domain and mapped domain properly.

Then, in Cherokee...

Create a Source (under Sources)
 Type: Remote Host
 Nickname: Cherokee
 Connection: [the ip and port which can reach Cherokee Web Server]

In WordPress.. (you need to enable multisite first).

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

Then, back in Cherokee...

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

Now, you can go back to WordPress...

Go to site... configure, etc.
(set permalinks properly, etc.)

Finally, back in Cherokee...

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)

Lastly, restart Cherokee! That's it!

ikevin8me
  • 137
  • 1
  • 6