Webmasters Blog - Salem-News.com - Matts Design Blog Salem-News.com

Webmasters Blog - Salem-News.com

Matts Design Blog Salem-News.com

Setting up Apache Subdomains

Well I got my blogs started and moved out of the main directory and into subdomains me designs.salem-news.com David tech.salem-news.com the rest sharing opinion.salem-news.com.

It went well after relearning how to set up virtual hosts for the sub-domains as I havn’t done that in a few months.

httpd.conf partial
# Use name-based virtual hosting.
#Remember to uncheck this
NameVirtualHost *:80
#

Then repeat this for each virtual host

<VirtualHost *:80>
DocumentRoot “/path/to/matts/blog”
ServerName designs.salem-news.com
<Directory “/path/to/matts/blog”>
allow from all
Options +Indexes
#mod_rewrite for wordpress
  <IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule . /index.php [L]
  </IfModule>
</Directory>
</VirtualHost>

Comments are closed.