• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Virtual Servers

how do i host more the one page on linux with apache

and if is by Virtual Servers how dose it work

and how can i set it up
0
die0u0die
Asked:
die0u0die
  • 3
  • 2
1 Solution
 
pjedmondCommented:
You just add extra pages to the web directory if you want to host extra pages on a specific website. However if you want to host multiple websites for different domains on your PC, then you need to edit your httpd.conf file to be something like this for a single interface, and multiple domains/web addresses:
--------------------------------------X8-------------

NameVirtualHost *:80   # Any port 80 connection on any interface is virtual host

# Virtual host www.mysite.com
<VirtualHost _default_:80>     # On default interface - assume one:)
DocumentRoot /var/www/html/www/
       Options ExecCGI
       ServerName www.mysite.com
       ScriptAlias /cgi-bin/ /var/www/cgi-bin/main/
</VirtualHost>

# Virtual host www.battlefields.com
<VirtualHost _default_:80>
       DocumentRoot /var/www/html/battlefields/
       ServerName www.battlefields.com
</VirtualHost>

# Virtual host www.alex.com
<VirtualHost _default_:80>
       DocumentRoot /var/www/html/alex/
       ServerName www.alex.com
       DirectoryIndex index.htm
</VirtualHost>
--------------------------------------X8-------------

DNS servers must resolve:

www.alex.com
www.battlefields.com
www.mysite.com

to the interface of this system.

Hope that the above makes sense. Remember, that you attempt to access the site using the IP address, then it will access the default site only, there is no way for the server to be avble to work out which name you mean!!!

Hope that helps:)
0
 
die0u0dieAuthor Commented:
that make no sense to me

tis is what i need to do

i have my page on line

and my brother would like his page on line

but i olny want on pc for both so some thing like this my page = www.my.com page2=www.my.com/brother
0
 
die0u0dieAuthor Commented:
DNS servers must resolve and how do i do this
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
livepcliveCommented:
0
 
livepcliveCommented:
0
 
die0u0dieAuthor Commented:
just the infor i need
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now