LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Virtual Hosting (https://www.linuxquestions.org/questions/linux-newbie-8/virtual-hosting-748763/)

dougreed 08-19-2009 11:31 AM

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

wolfperkins 08-19-2009 11:41 AM

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.

dougreed 08-19-2009 12:05 PM

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

kapilsingh 08-19-2009 12:21 PM

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

dougreed 08-20-2009 09:19 AM

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

fpmurphy 08-20-2009 10:32 AM

Can you show us your httpd.conf?

wolfperkins 08-20-2009 11:14 AM

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

dougreed 08-20-2009 11:59 AM

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


All times are GMT -5. The time now is 01:42 PM.