|
Revision 616, 1.1 kB
(checked in by jjb, 4 years ago)
|
Subdomains!
Most of the pieces in order to use subdomains. The way that cookies are set needs to be adapted to this system. As it is now, users have to keep re-logging-in when they switch from one domain to another.
Many thanks to coffelius of http://bloggear.net for help and code.
ticket:326
|
| Line | |
|---|
| 1 |
By default, Lyceum structures blog urls as "directories": |
|---|
| 2 |
|
|---|
| 3 |
http://blogs.example.com/catblog |
|---|
| 4 |
http://blogs.example.com/monkeyblog |
|---|
| 5 |
|
|---|
| 6 |
Lyceum can also structure blog urls using subdomains: |
|---|
| 7 |
|
|---|
| 8 |
http://catblog.blogs.example.com/ |
|---|
| 9 |
http://monkeyblog.blogs.example.com/ |
|---|
| 10 |
|
|---|
| 11 |
Here is how to do that: |
|---|
| 12 |
|
|---|
| 13 |
1] Go through the installation instructions in Installation.txt. |
|---|
| 14 |
|
|---|
| 15 |
2] In your wp-config.php, set SUBDOMAINS to 'true', and MAINDOMAIN to the top portion of your domain. In the examples about, MAINDOMAIN would be 'blogs.example.com'. |
|---|
| 16 |
|
|---|
| 17 |
3] Set a wildcard DNS entry for your domain, using the DNS server that you use for all your other DNS entries. If you are doing it by hand, the entry will look something like this: |
|---|
| 18 |
|
|---|
| 19 |
*.blogs.example.com. IN A 123.456.789.123 |
|---|
| 20 |
|
|---|
| 21 |
4] Configure apache to have a Wildcard Subdomain Virtual Host (I just made up that term). It will look something like this: |
|---|
| 22 |
|
|---|
| 23 |
<VirtualHost *> |
|---|
| 24 |
ServerName blogs.example.com |
|---|
| 25 |
ServerAlias * |
|---|
| 26 |
|
|---|
| 27 |
ServerAdmin webmaster@example.com |
|---|
| 28 |
DocumentRoot /var/www/html |
|---|
| 29 |
|
|---|
| 30 |
<Directory /var/www/html > |
|---|
| 31 |
Options Indexes FollowSymLinks MultiViews |
|---|
| 32 |
AllowOverride All |
|---|
| 33 |
Order allow,deny |
|---|
| 34 |
allow from all |
|---|
| 35 |
</Directory> |
|---|
| 36 |
</VirtualHost> |
|---|