Jump to content
xisto Community

Apache2 Virtualhost

Recommended Posts

Other than adding virtual host directive on sites-available/default

<VirtualHost *:80>ServerName http://myDomain.comserveralias/ mydomain.comDocumentRoot /home/user/htdocs/mydomain</VirtualHost>

do i need to setup anything on the domains DNS setting for this to work? or is the A Record assignment sufficient?


would i need to set some kind of permission on the folder on the server?


my understanding of this is that when a http request is made to mydomain.com the DNS server will just throw it my ip and then Apache will handle the rest??


cheers for any help

Edited by manuleka (see edit history)

Share this post

Link to post
Share on other sites

my understanding of this is that when a http request is made to mydomain.



A - Record should be sufficient. Hopefully, You got a Static IP address.


Usually Apache works just fine and by default


permission for folder should be 644.

Ownership should be apache:apache

Share this post

Link to post
Share on other sites

thanks OpaQue


it worked ... just created a copy of "default" and named it "website"


then altered the folder directive to point to "website" folder


then a2ensite website and it worked :)

Share this post

Link to post
Share on other sites

So you intall apache 2 virtual host on a computer (probably a server) that is intended to host websites.


I don't know much about the mechanics of hosting but from what I know the ideal scenario is that a computer (server) has an operating system designed for its use as a server. That operating system provides tools to run a website.


Now according to my knoweldge, if you want to host multiple websites on a single machine, you would have to create virtual machines, each hosting a single website. So in this way many websites can be hosted on a single machine, giving rise to the term shared hosting.


But this apache 2 virtual host is something really new for me. Is it some kind of alternative to what virtual machines do. Or there is some basic fault in my understanding. in either case, I would love to know the answer.....

Share this post

Link to post
Share on other sites

Please do not mix two concepts.

Hardware people name "server" a box with a cpu chip, memory chips, and disks.

vmware peple name "server" a virtual partition running a software (linux, windows) and serving a service (webserver, DNS server, gateway)

Apache people name "server" the Apache process, in charge of connecting external people to internal processes.

And now the current topic talks about virtualizing the Apache service, meaning adding different definitions inside the same physical (or virtual) machine, in order to make one Apache server working for two different websites.

And if you feel that I made very complicated a very simple concepts, please tell me, that will make me happy :D

Share this post

Link to post
Share on other sites

Actually you did a wonderful job. You made me realize that the minimal knowledge I have about servers is so incomplete that it makes my perception faulty. I didn't really know that the word "server" is used in so many related but quite different ways.


I think I need to improve my background knowledge significantly. :(

Share this post

Link to post
Share on other sites

That's the great philosophical problem we have, as well as all Information Technology hardware people.

I have to know everything, precisely, at each moment :

Where is my hardware (boot disk, cpu, memory)

Where are my data disks (SSA, fiberchannel, Storage Area Network disks, Network Area Storage disks, direct-attach disks)

Where do my Ethernet packets walk

And of course we have to manage failover facilities, which means that the hardware currently in use can be in several different places, easily switching from one place to the other one.

And should I give a customer a real complete hardware machine, or shared time inside a hardware machine, or a complete server encapsulated inside a bigger hardware?

Of course, if I ask the question exactly that way, everybody start crying and will run away from myself.

That's why the real question to ask, which is exactly the same question but stated in slightly different way, is "do yo want a cloud system, fully redondant with a distributed failure-safe storage, with 99.999% uptime?" And the answer is "yes plase"

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.