|
Revision 904, 1.0 kB
(checked in by jjb, 2 years ago)
|
Better ServerAlias? for subdomains, for systems running more than one subdomain. (before, * would capture ALL incoming domain requests)
|
| 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' |
|---|
| 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 *.blogs.example.com |
|---|
| 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> |
|---|