LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   guidance required for configuring virtual host (https://www.linuxquestions.org/questions/linux-general-1/guidance-required-for-configuring-virtual-host-675280/)

yogesh619 10-09-2008 04:53 AM

guidance required for configuring virtual host
 
Hi

can anybody guide; i m trying to configure a virtual host
but on system other than webserver.
In my network DNS,DHCP,and a web server has been already configured on
three different systems.now i want to configure a virtual host but on system other than above three . and make it accesible with certain URL
for example. testhost.mydomain.com

how can i do it

thanks!

r3sistance 10-09-2008 10:49 PM

well you either need a static IP or to use a DynamicDNS service to have a URL always pointing at the server. There is alot of manuals around about how to configure virtual hosts and I find they are usually extremely confusing. Below is a virtual host I have configured on my server

Code:

<VirtualHost *:80>
        DocumentRoot /var/www/html/vmhost/
        ServerName r3sistance.net
        ServerAlias www.r3sistance.net
</virtualHost>

from /etc/httpd/httpd.conf

DocumentRoot is the actual folder that is used as the Vhosts home. Server name is the URL that points at the virtualhost and server alais is alternative URLs that can also point at the same virtual host. This virtual host is configured within apache. If you get a static IP you can change *:80 to ip:80 for example this server uses 85.234.131.138 so it could be 85.234.131.138:80 instead. I just leave it as *:80 to be simple, also if you currently have a web server on :80 you could use say an alternative port like say *:8080 to use port 8080 for this virtual host you are trying to set up. My VirtualHost is simpliest in the way it doesn't have seperate logs for the virtual host but as this is a VPS that implicitly only hosts this site, if you want to look up on logs then I'll have to guide you to a manual as I don't really deal with seperate logs for my virtualhosts on this VPS.


All times are GMT -5. The time now is 12:08 PM.