How to set up virtual hosts on Apache 2.2?

Just have 2 virtual hosts defined like this, but with differeing DocumentRoots: VirtualHost *:80> ServerAdmin [email protected]. Com DocumentRoot "/docs/dummy-host.somecompany. Com" ServerName dummy-host.somecompany.Com ServerAlias dummy-host.somecompany.com ErrorLog "logs/dummy-host.somecompany.

Com-error. Log" CustomLog "logs/dummy-host.somecompany.Com-access. Log" common ServerAdmin [email protected].

Com DocumentRoot "/docs/dummy-host.somecompany.Com" ServerName dummy-host.somecompany. Com ServerAlias dummy-host.somecompany.com ErrorLog "logs/dummy-host.somecompany. Com-error.

Log" CustomLog "logs/dummy-host.somecompany. Com-access. Log" common.

Just have 2 virtual hosts defined like this, but with differeing DocumentRoots: ServerAdmin [email protected]. Com DocumentRoot "/docs/dummy-host.somecompany. Com" ServerName dummy-host.somecompany.Com ServerAlias dummy-host.somecompany.com ErrorLog "logs/dummy-host.somecompany.

Com-error. Log" CustomLog "logs/dummy-host.somecompany.Com-access. Log" common ServerAdmin [email protected].

Com DocumentRoot "/docs/dummy-host.somecompany.Com" ServerName dummy-host.somecompany. Com ServerAlias dummy-host.somecompany.com ErrorLog "logs/dummy-host.somecompany. Com-error.

Log" CustomLog "logs/dummy-host.somecompany. Com-access. Log" common.

ServerName dummy-host.somecompany. Com ServerAlias dummy-host.somecompany.com – Cuga May 5 '09 at 14:33 The only thing that really matters is DocumentRoot.Im pretty sure (though not certain), that you could omit all other declarations and just point your browser to localhost:80 or localhost:8089 and you'll get the corresponding files being serveed from the appropriate DocumentRoot – Visage May 5 '09 at 14:57 I just tried what you said-- no difference. Whether I type in localhost:80 or localhost:8089, I still see the same webpage I have at port 80 and not the one I have at port 8089.

– Cuga May 6 '09 at 2:12.

First you need to instruct Apache to listen on the ports you need: Listen 80 Listen 8089 Second you need to tell it what to do with 80 and 8089 traffic: DocumentRoot /website/site80 ServerName internet. Dev DocumentRoot /website/site8089 Third you need to "allow" Apache to use those directories: Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all.

It's still redirecting me to the site at port 80. I really don't get it. – Cuga May 10 '09 at 13:43.

After saving your changes to apache, stop apache and restart it. That might help load the new settings. I know its been months since your post, but maybe this will help you or other people searching for it.

I found that this manual was very useful because it mentions things you need to do to get it to work (like the difference between sites-available and sites-enabled and how to link one to the other). Also it has a lot of practical examples to use. I can't tell you the number of times tutorials have provided me with an example virtual host script but haven't told me where to put it (/home/user/Documents?

/usr/bin? /dev/null? ).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions