Computer Forums

Computer Forums (http://www.geekboards.com/forums/index.php)
-   Building Websites (http://www.geekboards.com/forums/forumdisplay.php?f=3)
-   -   Virtual Host (http://www.geekboards.com/forums/showthread.php?t=671)

MMeffert 03-05-2006 07:48 PM

Virtual Host
 
How would I setup another domain in the apache config file so I can have 2 domains going to the same server but go to different directories on the server?

Soulwatcher 03-06-2006 05:21 AM

I am going to assume that you are using Apache 2. I went to www.apache.org to find the Documentation that you need. http://httpd.apache.org/docs/2.0/vhosts/ That should give you the information you need to setting up your Virtual Host. If there is something you don't under stand. Just ask and I will be more than willing to help.

MMeffert 03-06-2006 06:44 AM

So I just take this and fill in my information and then in the server name I just put the new domain and it will work?

<VirtualHost *:80>

ServerAdmin mitchell@mitchellmeffert.com
DocumentRoot /www/NEWDOMAIN
ServerName NEWDOMAIN.com
ErrorLog logs/host.foo.com-error_log
TransferLog logs/host.foo.com-access_log
</VirtualHost>

What does this line do TransferLog logs/host.foo.com-access_log?
Does it just move the log or rename it?

Soulwatcher 03-06-2006 07:51 AM

Some one correct me if I am wrong. But this is a old example of how I had my Virtual Host setup. This setup is before me using a control panel.

# Virtual host How To Webserver
<VirtualHost 192.168.1.151>
DocumentRoot /home/mywebsite
ServerAdmin soulwatcher@*******.com
ServerName www.mywebsite.com
ServerAlias mywebsite.com
ServerAlias www.mywebsite.net
ServerAlias mywebsite.net
<Directory "/home/mywebsite/">
AllowOverride none
</Directory>

You should have Apache always configured to listen on port 80.

MMeffert 03-06-2006 02:58 PM

ok so I can just add that to the config file and then point another domain at the server and it should work or is there something else I have to do so each domain goes to the write place?

Soulwatcher 03-06-2006 03:33 PM

Just make sure you restart Apache and you should be all set. Let me know if you have any problems and I will see what I can do to help. :)

MMeffert 03-06-2006 07:49 PM

Ok thanks. I will give it a try.

John23 03-28-2011 01:54 AM

Re:
 
There may be exceptions to this rule, such as when a project is anticipated to experience exponential growth and a dedicated hosting service is chosen right at the start. Even if you do choose a shared hosting service initially, you may realize at one point or another that the demanding requirements of your web site can no longer be satisfied by shared hosting. And if your project now has a steady revenue stream, the cost of migrating to a dedicated hosting platform may appear less intimidating than it did at first.


All times are GMT -5. The time now is 04:31 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
HTML Help provided by HTML Help Central.