LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-19-2009, 11:31 AM   #1
dougreed
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Rep: Reputation: 0
Virtual Hosting


Hello, I am trying to get virtual hosting to work. I am using Fedora 10 and I have configured httpd.conf and DNS records. I have also loaded the web site data into the /var/www/html/ directory. I now try to access my web page but get back the Fedora Core Test page and not the web page loaded into the directory. I can get my main web page to work, please can some help and let me know where my mistake is in trying to get my second web page to work. Kind regards Doug
 
Old 08-19-2009, 11:41 AM   #2
wolfperkins
Member
 
Registered: Oct 2007
Location: Val-des-Monts, Québec, Canada
Distribution: CentOS, RHEL, Fedora
Posts: 109

Rep: Reputation: 16
How are you calling your page?

A file here /var/www/html/mypage.html can be called through a browser with http://localhost/mypage.html

But if you go to http://localhost/ it will serve you the default page.

You could also setup the mypage.html as the default page by adjusting /etc/httpd/httpd.conf and restarting the httpd service.
 
Old 08-19-2009, 12:05 PM   #3
dougreed
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Virtual Hosting

Many thanks for reply. I access the web page using Explorer and "www.mypage.com" and at the moment I am remote from the Fedora server, will try localhost tomorrow. Regards Doug
 
Old 08-19-2009, 12:21 PM   #4
kapilsingh
LQ Newbie
 
Registered: Apr 2009
Location: Indore, India
Distribution: ubuntu, centOS,RHEL,Mandriva
Posts: 10

Rep: Reputation: 0
please check the permission of your file mypage.html.
if not proper do it 644 using chmod 644 /var/www/html/mypage.html
and restart the service
 
Old 08-20-2009, 09:19 AM   #5
dougreed
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Original Poster
Rep: Reputation: 0
I have tried http://localhost/ and http://localhost/mypage.html and the browser returns IE returns "Internet Explorere cannot display page. I have also checked the permissions and all seem to okay. Have you any other ideas? Many thanks Doug
 
Old 08-20-2009, 10:32 AM   #6
fpmurphy
Member
 
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 299

Rep: Reputation: 62
Can you show us your httpd.conf?
 
Old 08-20-2009, 11:14 AM   #7
wolfperkins
Member
 
Registered: Oct 2007
Location: Val-des-Monts, Québec, Canada
Distribution: CentOS, RHEL, Fedora
Posts: 109

Rep: Reputation: 16
If you connect to the page from a remote machine you either have to go to your webserver by ip address. If the web server's ip address is 192.168.1.2 then try http://192.168.1.2/mypage.html
 
Old 08-20-2009, 11:59 AM   #8
dougreed
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you everybody for the help, eventually found the problem with the DirectoryIndex directive in the httpd.conf file, I was missing a certain .htm file, my web page data had a default.htm file and I did not have in my DirectoryIndex. Just need to be able to access the web site from internally now, can access the web page externally. Kind regards Doug
 
  


Reply

Tags
apache, fedora, virtualhost


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
do I really need virtual hosting if only hosting one site kustomjs Linux - Server 8 05-22-2008 12:17 PM
Virtual Hosting bstuart Linux - Software 1 06-19-2005 11:26 AM
Virtual hosting... id10t Linux - Networking 4 02-02-2004 05:43 PM
Virtual Hosting - what does it actually do? gevers1 Linux - General 3 02-01-2004 09:28 AM
Virtual Hosting marson Linux - General 2 12-28-2000 08:14 PM


All times are GMT -5. The time now is 10:49 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration