<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Domain name based location in server in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/domain-name-based-location-in-server/m-p/2959939#M4466</link>
    <description>I have two domain names pointing to the same IP address. I'm running Apache server that comes with RedHat 7.1. Does someone know if there is a way to direct one domain name to one web page on Apache and direct the other domain name to another web page.</description>
    <pubDate>Sat, 26 Apr 2003 15:59:00 GMT</pubDate>
    <dc:creator>Vernon Brown_3</dc:creator>
    <dc:date>2003-04-26T15:59:00Z</dc:date>
    <item>
      <title>Domain name based location in server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/domain-name-based-location-in-server/m-p/2959939#M4466</link>
      <description>I have two domain names pointing to the same IP address. I'm running Apache server that comes with RedHat 7.1. Does someone know if there is a way to direct one domain name to one web page on Apache and direct the other domain name to another web page.</description>
      <pubDate>Sat, 26 Apr 2003 15:59:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/domain-name-based-location-in-server/m-p/2959939#M4466</guid>
      <dc:creator>Vernon Brown_3</dc:creator>
      <dc:date>2003-04-26T15:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Domain name based location in server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/domain-name-based-location-in-server/m-p/2959940#M4467</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you could use mod_vhosts_alias and add this to your /etc/httpd/conf/Vhosts.conf file&lt;BR /&gt;&lt;BR /&gt;# Dynamic mass virtual hosting&lt;BR /&gt;&lt;VIRTUALHOST 192.168.1.10=""&gt;&lt;BR /&gt;UseCanonicalName Off&lt;BR /&gt;VirtualDocumentRoot /var/www/html/vhosts/%2+/%1/&lt;BR /&gt;LogFormat "%v %h %l %u %t \"%r\" %s %T %b" VLOG&lt;BR /&gt;IndexOptions FancyIndexing IconHeight IconWidth IconsAreLinks FoldersFirst&lt;BR /&gt;CustomLog logs/access_log VLOG&lt;BR /&gt;&lt;/VIRTUALHOST&gt;&lt;BR /&gt;&lt;BR /&gt;This will take the domain name in the header and redirect it to the proper folder.&lt;BR /&gt;&lt;BR /&gt;Exemple:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.domain.com" target="_blank"&gt;http://www.domain.com&lt;/A&gt; would be redirected to /var/www/html/vhosts/domain.com/www/&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;&lt;A href="http://www.domain2.org" target="_blank"&gt;http://www.domain2.org&lt;/A&gt; would be redirected to /var/www/html/vhosts/domain2.org/www/&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Sat, 26 Apr 2003 16:51:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/domain-name-based-location-in-server/m-p/2959940#M4467</guid>
      <dc:creator>Jean-Pierre Denis</dc:creator>
      <dc:date>2003-04-26T16:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Domain name based location in server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/domain-name-based-location-in-server/m-p/2959941#M4468</link>
      <description>Thanks, I'll try that. I'll have to study that awhile to understand how it can work.&lt;BR /&gt;&lt;BR /&gt;I take it that the &lt;VIRTUALHOST 192.158.1.10=""&gt; should be the IP address of my server. I don't understand exactly the path. Do I need to create directories under the specific name "vhosts" or is will any path to a folder work??&lt;/VIRTUALHOST&gt;</description>
      <pubDate>Sat, 26 Apr 2003 19:30:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/domain-name-based-location-in-server/m-p/2959941#M4468</guid>
      <dc:creator>Vernon Brown_3</dc:creator>
      <dc:date>2003-04-26T19:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Domain name based location in server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/domain-name-based-location-in-server/m-p/2959942#M4469</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Every host using the dynamic mass virtual hosting have a dns "A" record pointing to 192.168.10. My webserver ip is 192.168.1.5 and i've created a virutal interface eth0:0 with the ip 192.168.1.10&lt;BR /&gt;&lt;BR /&gt;The path to the VirtualDocumentRoot could be anything. VirtualDocumentRoot /var/www/html/vhosts/%2+/%1/ . By default Mandrake create the apache root directory in /var/www/html so i created a folder "vhosts" to put all my virutal host. You could change it to what you want. ( /home/httpd/vhosts/... ) and create a folder with the domainname.com and in this directory create the www folder.&lt;BR /&gt;&lt;BR /&gt;The important part is %2+ and %1. This is making the whole thing dynamic.&lt;BR /&gt;&lt;BR /&gt;Host examples and where they would be redirected:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.domain.com" target="_blank"&gt;www.domain.com&lt;/A&gt;      /path/to/vhosts/domain.com/www/index.html&lt;BR /&gt;support.domain.org  /path/to/vhosts/domain.org/support/index.html&lt;BR /&gt;secure.domain.net   /path/to/vhosts/domain.net/secure/index.html&lt;BR /&gt;&lt;BR /&gt;Here is some good documentation about virtual hosting:&lt;BR /&gt;&lt;A href="http://httpd.apache.org/docs/vhosts/mass.html" target="_blank"&gt;http://httpd.apache.org/docs/vhosts/mass.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://httpd.apache.org/docs/mod/mod_vhost_alias.html" target="_blank"&gt;http://httpd.apache.org/docs/mod/mod_vhost_alias.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;JP</description>
      <pubDate>Sun, 27 Apr 2003 11:30:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/domain-name-based-location-in-server/m-p/2959942#M4469</guid>
      <dc:creator>Jean-Pierre Denis</dc:creator>
      <dc:date>2003-04-27T11:30:40Z</dc:date>
    </item>
  </channel>
</rss>

