logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Problem with Virtual Hosting on linux/apache2
Author
treefit



Joined: 27 May 2010
Posts: 2

PostPosted: Thu 27 May '10 3:42    Post subject: Problem with Virtual Hosting on linux/apache2 Reply with quote

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

PostPosted: Thu 27 May '10 5:02    Post subject: Reply with quote

http://www.apachehaus.com/index.php?option=com_content&view=article&id=77:beginners-guide-to-virtual-hosting&catid=31:general&Itemid=41
Back to top
treefit



Joined: 27 May 2010
Posts: 2

PostPosted: Thu 27 May '10 20:27    Post subject: Reply with quote

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

PostPosted: Thu 27 May '10 22:48    Post subject: Reply with quote

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

PostPosted: Fri 28 May '10 11:33    Post subject: Reply with quote

@Gregg why do you think it is 2.0 apache? For the folder structure I think you can take a look at http://wiki.apache.org/httpd/DistrosDefaultLayout#Debian.2C_Ubuntu_.28Apache_2.29:
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 28 May '10 16:51    Post subject: Reply with quote

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 Wink

That also reminds me I need to upgrade Fedora to lucky 13 where hopefully everything works properly again.
Back to top


Reply to topic   Topic: Problem with Virtual Hosting on linux/apache2 View previous topic :: View next topic
Post new topic   Forum Index -> Apache