I added the lines in /etc/hosts, so now when I try <a href="http://theswebsite.com">http://theswebsite.com</a> (secondwebsite) on the computer that is the server, it shows me my first site, the same thing happen when I try <a href="http://www.linuxabcd.org">http://www.linuxabcd.org</a>.<br>
If instead of <a href="http://www.linuxabcd.org">http://www.linuxabcd.org</a> I try file://www.linuxabcd.org, I see my file system.<br><br>When I try from the Windows computer I can find only the first site<br>I tried <a href="http://192.168.0.105">http://192.168.0.105</a>, goes to the first website (seems logical to me)<br>
<a href="http://192.168.0.105/www.theswebsite.com">http://192.168.0.105/www.theswebsite.com</a> the webpage cannot be found. It does the same with file://192.168.0.105/www.theswebsite.<br><br>I tried apache2 -S in the terminal and this is the result:<br>
VirtualHost configuration:<br>wildcard NameVirtualHosts and_default_servers:<br>*:*                                 is a NameVirtualHost<br>       default server <a href="http://myfirstsite.com">myfirstsite.com</a> (etc/apache2/sites-enabled/mysite:2)<br>
       port * namevhost <a href="http://myfirstsite.com">myfirstsite.com</a> (/etc/apache2/sites-enabled/mysite:2)<br>Syntax OK<br><br>It apparently recognizes only one server name which is the name of the first website.<br>
Is there anything except writing name server and server alias in the virtual host files that I should have done? <br>I have now <a href="http://192.168.0.105/" target="_blank">192.168.0.105</a> <a href="http://www.linuxabcd.org/" target="_blank">www.linuxabcd.org and </a><a href="http://192.168.0.105/" target="_blank">192.168.0.105</a> name.second.domain defined in /etc/hosts<br>
Thank you<br>Meg<br><br><br><div class="gmail_quote">On Feb 4, 2008 3:55 PM, Aart Koelewijn <<a href="mailto:aart@mtack.xs4all.nl">aart@mtack.xs4all.nl</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Mon, 04 Feb 2008 15:15:39 -0500, Ashley Benton wrote:<br><br>> I deleted everything, and just left, name server and server alias... in<br>> the <VirtualHost> </VirtualHost> files.<br>
> The result is the same. I can open the link of the page I moved with<br>> Windows but not with my computer. When I try to open the page directly<br>> Firefox and internet explorer they write "can't find the server at<br>
> LinuxAbcd.org" I guess it's because I didn't buy a domain name for this<br>> two sites. and I will do it later.<br>> Now If I open (file://www.linuxabcd.org) the Swebsite or linux abcd from<br>> the computer it is on I see my system directory. If I try to open on the<br>
> windows computer ( <a href="http://192.168.0.105/www.linuxabcd.org" target="_blank">http://192.168.0.105/www.linuxabcd.org</a> or<br>> file://192.168.0.105/www.linuxabcd.org) It says "the requested URL was<br>
> not found on this server" (apache 2.2.4 Ubuntu server at 192,168.0.105<br>> port 80 The last part I don't understand because when I installed<br>> apache2 and the first site I was able to open it by writing the private<br>
> IP of the computer before I bought the domain name. Now shouldn't I be<br>> able to open the other sites with the internal Ip, followed by the<br>> server name? Does anybody see a reason why I seem to be unable to<br>
> configure more than 1 virtual host?<br>> Thank you<br>> Meg<br>><br>> On Feb 4, 2008 2:09 PM, Ashley Benton <<a href="mailto:meggalen@gmail.com">meggalen@gmail.com</a>> wrote:<br>><br>>> I will try again like you say and delete everything that I put in every<br>
>> other files. I still have one question. Last night I copy my second<br>>> site main page, put it in the first site folder, and change the links<br>>> to have the first site open it where it was. It didn't work with my<br>
>> computer using Ubuntu 7.10, but it worked with Windows. If I try to see<br>>> it with internet explorer and Firefox using Windows it works.<br>>> If I try to see it using Firefox and Ubuntu 7.10 I can't see neither<br>
>> the links nor the other page?<br>>> Do I have to put it in the list of file, inside the host configuration?<br>>> I think I am missing something very easy and important but I have been<br>>> reading and searching and I didn't find out yet. From what you say I<br>
>> imagine that I don't have to add NameVirtualHost in<br>>> /etc/apache2/ports.conf. so I will delete it too. I have been trying<br>>> some more last night and I am stuck.<br>>> Thank you for your answer, I will change the files back and let you<br>
>> know the result.<br>>> Meg<br>>><br>>><br>>> On Feb 4, 2008 10:56 AM, Derek Broughton <<a href="mailto:news@pointerstop.ca">news@pointerstop.ca</a>> wrote:<br>>><br>>> > Ashley Benton wrote:<br>
>> ><br>>> > > Sorry I have NameVirtualHost <a href="http://192.168.0.105" target="_blank">192.168.0.105</a> on the first line and<br>>> > > <VirtualHost <a href="http://192.168.0.105" target="_blank">192.168.0.105</a> > on the second line. Meg<br>
>> ><br>>> > Karl's leading you astray...<br>>> ><br>>> > One only needs NameVirtualHost to specify an IP if you have multiple<br>>> > interfaces to the Internet.  For this, and almost certainly for your<br>
>> > production version, you want:<br>>> ><br>>> > NameVirtualHost *<br>>> ><br>>> > <VirtualHost *><br>>> >   ServerName <a href="http://example.org" target="_blank">example.org</a><br>
>> >   ...<br>>> > </VirtualHost><br>>> ><br>>> > <VirtualHost *><br>>> >   ServerName <a href="http://another.org" target="_blank">another.org</a><br>>> >   ...<br>
>> > </VirtualHost><br>>> ><br>>> > From your original mail:<br>>> ><br>>> > > I tried to add the following lines in /etc/apache2/http.conf<br>>> > > ServerName localhost<br>
>> > > ServerName <a href="http://www.example1.com" target="_blank">www.example1.com</a><br>>> > > ServerName <a href="http://www.example2.com" target="_blank">www.example2.com</a><br>>> > > ServerName <a href="http://www.Example.org" target="_blank">www.Example.org</a><br>
>> ><br>>> > That's bad :-)  You want the ServerName directives for each virtual<br>>> > host _only_ within the <VirtualHost> definition.<br>>> ><br>>> > (and we don't ever modify http.conf! - put each virtual host config<br>
>> > in a separate file in /etc/apache2/sites-enabled) --<br>>> > derek<br>>> ><br>>> ><br>>> > --<br>>> > ubuntu-users mailing list<br>>> > <a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
>> > Modify settings or unsubscribe at:<br>>> > <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>>> ><br>
>> ><br>>><br>> I deleted everything, and just left, name server and server alias... in<br></div></div>> the &lt;VirtualHost&gt; &lt;/VirtualHost&gt; files.<br>The result is the<br>
<div class="Ih2E3d">> same. I can open the link of the page I moved with Windows but not with<br>> my computer. When I try to open the page directly Firefox and internet<br></div>> explorer they write &quot;can&#39;t find the server at<br>
> LinuxAbcd.org&quot; I guess it&#39;s because I didn&#39;t buy a domain<br>> name for this two sites. and I will do it later.<br> Now If I open<br><div class="Ih2E3d">> (file://www.linuxabcd.org) the Swebsite or linux abcd from the computer<br>
</div>> it is on I see my system directory.<br>If I try to open on the windows<br>> computer (<a<br>> href="<a href="http://192.168.0.105/www.linuxabcd.org" target="_blank">http://192.168.0.105/www.linuxabcd.org</a>"><a href="http://192.168.0.105/" target="_blank">http://192.168.0.105/</a><br>
<a href="http://www.linuxabcd.org" target="_blank">www.linuxabcd.org</a></a><br>> or file://192.168.0.105/www.linuxabcd.org) It says &quot;the requested<br>> URL was not found on this server&quot; (apache 2.2.4 Ubuntu server at<br>
> 192,168.0.105 port 80<br> The last part I don&#39;t understand because<br><div class="Ih2E3d">> when I installed apache2 and the first site I was able to open it by<br>> writing the private IP of the computer before I bought the domain name.<br>
</div>> Now shouldn&#39;t I be able to open the other sites with the internal<br>> Ip, followed by the server name?<br> Does anybody see a reason why I<br>> seem to be unable to configure more than 1 virtual host? <br>Thank<br>
> you<br>Meg<br><br><div class="gmail_quote">On Feb 4, 2008 2:09 PM,<br>> Ashley Benton &lt;<a<br>> href="mailto:<a href="mailto:meggalen@gmail.com">meggalen@gmail.com</a>"><a href="mailto:meggalen@gmail.com">meggalen@gmail.com</a></a>&gt; wrote:<br><br>
> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204,<br>> 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I will try<br><div class="Ih2E3d">> again like you say and delete everything that I put in every other<br>
> files. I still have one question. Last night I copy my second site main<br>> page, put it in the first site folder, and change the links to have the<br></div>> first site open it where it was. It didn&#39;t work with my computer<br>
> using Ubuntu 7.10, but it worked with Windows.<br><br><div class="Ih2E3d">><br>> If I try to see it with internet explorer and Firefox using Windows it<br></div>> works. <br>If I try to see it using Firefox and Ubuntu 7.10 I can&#39;t<br>
> see neither the links nor the other page?<br>Do I have to put it in the<br>> list of file, inside the host configuration? <br><br><div class="Ih2E3d">><br>> I think I am missing something very easy and important but I have been<br>
</div>> reading and searching and I didn&#39;t find out yet. <br>From what you<br>> say I imagine that I don&#39;t have to add NameVirtualHost in<br><div class="Ih2E3d">> /etc/apache2/ports.conf. so I will delete it too. I have been<br>
</div>> trying&nbsp; some more last night and I am stuck.<br><br><div class="Ih2E3d">><br>> Thank you for your answer, I will change the files back and let you know<br></div>> the result.<br>Meg <div><div></div><div class="Wj3C7c"><br><br><div<br>
> class="gmail_quote">On Feb 4, 2008 10:56 AM, Derek Broughton &lt;<a<br>> href="mailto:<a href="mailto:news@pointerstop.ca">news@pointerstop.ca</a>"<br>> target="_blank"><a href="mailto:news@pointerstop.ca">news@pointerstop.ca</a></a>&gt; wrote:<br><br>
><br>> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204,<br>> 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Ashley<br>> Benton wrote:<br><br>&gt; Sorry I have NameVirtualHost <a<br>
> href="<a href="http://192.168.0.105" target="_blank">http://192.168.0.105</a>" target="_blank"><a href="http://192.168.0.105" target="_blank">192.168.0.105</a></a> on the<br>> first line and<br><br>
><br>> &gt; &lt;VirtualHost <a href="<a href="http://192.168.0.105" target="_blank">http://192.168.0.105</a>"<br>> target="_blank"><a href="http://192.168.0.105" target="_blank">192.168.0.105</a></a> &gt; on the second line.<br>&gt;<br>
> Meg<br><br></div>Karl&#39;s leading you astray...<br><br>One only needs<br>> NameVirtualHost to specify an IP if you have multiple<br><br>><br>> interfaces to the Internet. &nbsp;For this, and almost certainly for<br>
> your<br>production version, you want:<br><br>NameVirtualHost<br>> *<br><br>&lt;VirtualHost *&gt;<br> &nbsp; ServerName <a<br>> href="<a href="http://example.org" target="_blank">http://example.org</a>" target="_blank"><a href="http://example.org" target="_blank">example.org</a></a><br><br>
><br>>  &nbsp; ...<br>&lt;/VirtualHost&gt;<br><br>&lt;VirtualHost *&gt;<br><br>>  &nbsp; ServerName <a href="<a href="http://another.org" target="_blank">http://another.org</a>"<br>
>  target="_blank"><a href="http://another.org" target="_blank">another.org</a></a><br> &nbsp;<br>>  ...<br>&lt;/VirtualHost&gt;<br><br>From your original mail:<br><div><br>
> <br>&gt; I tried to add the following lines in<br>> /etc/apache2/http.conf<br>&gt; ServerName localhost<br>&gt; ServerName<br>> <a href="<a href="http://www.example1.com" target="_blank">http://www.example1.com</a>"<br>
> target="_blank"><a href="http://www.example1.com" target="_blank">www.example1.com</a></a><br>&gt; ServerName <a<br>> href="<a href="http://www.example2.com" target="_blank">http://www.example2.com</a>" target="_blank"><a href="http://www.example2.com" target="_blank">www.example2.com</a></a><br><br>
><br>> &gt; ServerName <a href="<a href="http://www.Example.org" target="_blank">http://www.Example.org</a>"<br>> target="_blank"><a href="http://www.Example.org" target="_blank">www.Example.org</a></a><br><br></div>That&#39;s bad :-)<br>
> &nbsp;You want the ServerName directives for each virtual host<br>_only_<br>> within the &lt;VirtualHost&gt; definition.<br><br>><br>> <br>(and we don&#39;t ever modify http.conf! - put each virtual host<br>
> config in a<br>separate file in<br>> /etc/apache2/sites-enabled)<br>--<br>derek<br><font<br>> color="#888888"><br><br>--<br></font><div><div></div><div> ubuntu-users<br>
> mailing list<br><a href="mailto:<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a>"<br>> target="_blank"><a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a></a><br>Modify settings or<br>
> unsubscribe at: <a<br>> href="<a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a>"<br>> target="_blank"><a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a></<br>
a><br><br>><br>> </div></div></blockquote></div><br><br>> </div></div></blockquote></div><br><br><br>Your computers will try to resolve <a href="http://www.linuxabcd.org" target="_blank">www.linuxabcd.org</a> and will find<br>
nothing. So in your /etc/hosts file you will have to put:<br><div class="Ih2E3d"><br><a href="http://192.168.0.105" target="_blank">192.168.0.105</a> <a href="http://www.linuxabcd.org" target="_blank">www.linuxabcd.org</a><br>
</div><a href="http://192.168.0.105" target="_blank">192.168.0.105</a> name.second.domain<br><br>to make sure the computer can translate the name to the right (internal)<br>IP<br><br>Once you have registered the domains and have a official IP for them<br>
(which points to your server) you can also use a proxy<br><br>Aart<br>Aart<br><font color="#888888"><br><br>--<br></font><div><div></div><div class="Wj3C7c">ubuntu-users mailing list<br><a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br></div></div></blockquote></div><br>