jk111
April 27th, 2008, 11:13 PM
Hello all,
I have set up apache on ubuntu server edition. I have everything running but I am having a very hard time setting up virtual hosting. I am using ssh to get into the server and change all the configuration files.
First, in /etc/apache2/sites-available, I have my own (new) file that i called example.exampledomain.com.conf
That file looks like this:
<VirtualHost example.exampledomain.com>
ServerAdmin example@example.com
#We want to be able to access the web site using www.dev.example.com or dev.example.com
ServerAlias www.example.exampledomain.com
DocumentRoot /home/myusername/public_html/example.exampledomain.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>
I have tried everything but still no luck. I have also tried the a2ensite but it says that site is already enabled. When I browse to my site, I get the normal, it works message instead of the index.html file I placed in my document root.
What am I doing wrong?
Thanks,
jk111
P.S. I also have a link to example.exampledomain.com.conf in /etc/apache2/sites-enabled
I have set up apache on ubuntu server edition. I have everything running but I am having a very hard time setting up virtual hosting. I am using ssh to get into the server and change all the configuration files.
First, in /etc/apache2/sites-available, I have my own (new) file that i called example.exampledomain.com.conf
That file looks like this:
<VirtualHost example.exampledomain.com>
ServerAdmin example@example.com
#We want to be able to access the web site using www.dev.example.com or dev.example.com
ServerAlias www.example.exampledomain.com
DocumentRoot /home/myusername/public_html/example.exampledomain.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>
I have tried everything but still no luck. I have also tried the a2ensite but it says that site is already enabled. When I browse to my site, I get the normal, it works message instead of the index.html file I placed in my document root.
What am I doing wrong?
Thanks,
jk111
P.S. I also have a link to example.exampledomain.com.conf in /etc/apache2/sites-enabled