LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-30-2012, 06:42 PM   #1
nyahuma
LQ Newbie
 
Registered: Jul 2012
Location: Kansas City
Posts: 13

Rep: Reputation: Disabled
Only one website is accessible from the internet


I appreciate all the assistance on reconnecting my apache server to the web. Initially I was able to connect from the web to my websites, until I moved and my ISP change the server I had used previously. Well now I can access one(1) website from the internet hosted on my server. However, I am unable to connect with any other site that I am hosting. I have placed my VirtualHosts in my default file in sites-available (like I had done previously) but regardless of the url I get the first VirtualHost displayed. I would like to know how to correct this issue.

Thanks for Your assistance and valuable information.

nyahuma
 
Old 08-30-2012, 06:52 PM   #2
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
First of all tell, which GNU/Linux Distribution you are using?. If it is Debian GNU/Linux, you have to place/create link for virtual host sites in /etc/apahe2/sites-enabled NOT /etc/sites/available

First try that. Let see if it solve the issue.
 
Old 08-30-2012, 08:06 PM   #3
nyahuma
LQ Newbie
 
Registered: Jul 2012
Location: Kansas City
Posts: 13

Original Poster
Rep: Reputation: Disabled
I presently using Ubuntu 11.10... I am not sure where to insert "create link for virtual host sites". I not only have my website(s) listed in my default file but also each file has it own www.mysite.com. No doubt an overkill but I am not sure it hat would make a difference. Looking forward to hear more on this issue.
Thank.
nyahuma
 
Old 08-30-2012, 08:41 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,547

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
What KinnowGrower meant above by "create link for virtual host sites" is that you need entries for each of your sites similar to the example one below from a standard httpd.conf file:
Code:
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /server/var/www/html
    ServerName dummy-host.example.com
    ErrorLog /var/log/httpd/dummy-host.example.com-error_log
    CustomLog /var/log/httpd/dummy-host.example.com-access_log common
</VirtualHost>
Also, in your initial post you indicate you have your VirtualHosts entries in "sites-available". Is that a typo? As suggested above, they should be in sites-enabled.
 
Old 08-30-2012, 08:45 PM   #5
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
I am assuming working of Apache, for Ubuntu and Debian works same way. You can do the follwoing

Assume /etc/apache2/sites-available have two virtual host config files named websites1 (www.mysite1.com) and website2 (www.mysite2.com)

Code:
cd to /etc/apache2/sites-enabled

ln -s ../sites-available/mysite1 .
ln -s ../sites-available/mysite2 .
It will create the two links in /etc/apache2/sites-enabled.You can check with
Code:
ls -l /etc/apache2/sites-enabled
then
Code:
/etc/init.d/apache2 restart
Now for www.mysite1.com apache will go to /etc/apache2/sites-enabled/mysites1 and for www.mysite2.com it will go to /etc/apache2/sites-enabled/mysites2

If you go only with IP in the browser, it will always serve the first one only. So always use the url (defined by ServerName in virtual hostfile) in browser corresponding to the website
 
Old 08-30-2012, 08:55 PM   #6
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
Quote:
Originally Posted by yancek View Post
Also, in your initial post you indicate you have your VirtualHosts entries in "sites-available". Is that a typo? As suggested above, they should be in sites-enabled.
Sites-available and sites-enabled are Debian thing. All the virtual host files in sites-available are just sitting there ( Apache wont serve them). To get them activated/served by Apache they need to be moved/created link in the sites-enabled directory. Only then Apache will look at them.

Last edited by KinnowGrower; 08-30-2012 at 08:56 PM.
 
Old 09-02-2012, 07:44 PM   #7
nyahuma
LQ Newbie
 
Registered: Jul 2012
Location: Kansas City
Posts: 13

Original Poster
Rep: Reputation: Disabled
Okay I think I am making progress on my server side. I do however, have a dns (dnsexit.com) which I thought was supposed to resolve my website names. So my question why is it still necessary to type my.dns.com/mysites.com. Rather than mysite.com from another network.

Thanks Again for your assistance.

nyahuma
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Connection not accessible in Ubuntu 9.10 Techieskull Linux - Networking 7 12-13-2009 05:35 AM
Website not accessible from the internet jimmy99 Linux - Newbie 8 07-25-2009 05:53 PM
My website is not accessible from particular countries gubak Linux - Networking 10 11-02-2006 02:34 AM
My website is not accessible anymore coralsaw Debian 7 03-07-2006 11:58 AM
Server not accessible from internet checta Linux - Networking 5 05-11-2004 05:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration