I'm attempting to setup WordPress multi site on my small ubuntu 10.04 laptop with apache2.
For normal WordPress installs in create an entry within the /etc/hosts file and make virtual hosts entry in /etc/apace2/sites-available directory after which soft link it to sites-enabled directory. For sub domain names, I added the server alias directive. But that's not doing anything. Have i got a syntax error. Please advice.
NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName mysite.com ServerAlias mysite.com *.mysite.com DocumentRoot /home/myhome/Sites/public_html/mysite.com #if using awstats ScriptAlias /awstats/ /usr/lib/cgi-bin/ #we want specific log file for this server CustomLog /var/log/apache2/example.com-access.log combined </VirtualHost>
You have to restart or reload Apache after making changes for your Apache configuration file. Exactly what does it let you know advertising media are:
sudo /etc/init.d/apache2 restart
Will it demonstrate any error messages? That will explain for those who have a syntax error. For the reference, here's a good example of using
ServerAlias which i have by myself server. Note the main difference between mine and yours. Perhaps you should take away the initial
mysite.com part and merely leave
Tell me in the event that helps.
<VirtualHost *:80> ServerAdmin firstname.lastname@example.org ServerAlias www.domain.com DocumentRoot /var/www/vhosts/domain.com/httpdocs ServerName domain.com ErrorLog /var/log/domain.com-error_log CustomLog /var/log/domain.com-access_log common </VirtualHost>