Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Problem with Virtual Hosting on linux/apache2 |
|
Author |
|
treefit
Joined: 27 May 2010 Posts: 2
|
Posted: Thu 27 May '10 3:42 Post subject: Problem with Virtual Hosting on linux/apache2 |
|
|
Hi,
I'm pretty new to apache.
I'm trying to install a VH using these instructions 'http://www.debuntu.org/2006/02/22/7-virtual-hosting-using-apache-2' but when try to '$sudo vi example.com.conf' to create a file for the 'sites-available' folder - the machine froze at the editor.
I tried to create the file on my pc and ftp it in - but the result was that the vh didn't work. I'm not sure if the vi editing is the issue - if you have an idea, I'd love to hear it.
Here is what the hosts file looks like:
<VirtualHost dev.60minutebankruptcy.com>
ServerAdmin webmaster@localhost
#We want to be able to access the web site using www.dev.example.com or dev.example.com
ServerAlias www.dev.60minutebankruptcy.com
DocumentRoot /etc/limesurvey
#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>
Thanks
Alex |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
|
Back to top |
|
treefit
Joined: 27 May 2010 Posts: 2
|
Posted: Thu 27 May '10 20:27 Post subject: |
|
|
Thanks but my httpd.conf is blank - seem slike all the data is in the apache2.conf file.
Also, I don't see 'httpd-vhosts.conf' - do you know what else that might be called?
Thanks |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 27 May '10 22:48 Post subject: |
|
|
2.0.63 you do not have the vhost file, that is for 2.2, my fault sorry. The object is still the same however. In the single file style, regardless of filename, vhosts are at the bottom.
The point I try to stress is to duplicate the "main host" as the first vhost after the NameVirtualHost *:80 line.
Also understand, even though you only have the one file, you could make a file called httpd-vhosts.conf or any name, and Include it in from the main configuration file. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 28 May '10 16:51 Post subject: |
|
|
Cause I'm a Wintard I guess, I have gotten used to apache (1.x), apache2 (2.0) and apache22 (2.2) since that is how it comes out of the compiler by default on Windoze.
Need to sticky a separate thread with that link in it, then the Linuxs folk can use it to translate my Windows instructions
That also reminds me I need to upgrade Fedora to lucky 13 where hopefully everything works properly again. |
|
Back to top |
|
|
|
|
|
|