#1  
Old 18th September 2012, 06:40
destinedjagold destinedjagold is offline
Junior Member
 
Join Date: Aug 2012
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default Virtual Hosts

Good day everyone.

I am trying to connect to CentOS Server from my Windows 7 PC.
Both PCs are connected on the same LAN router.

I can access the server both through its static IP and hostname.

Here's my problem...
The instant I type either the IP address or the hostname of the server, I want the server to throw me to a specific php page file.
Initially, when I go to the server, it shows me Apache's homepage.

I added a virtual host in the configuration file, pointing to the document root of the page I want to display, but it shows me a 404 Not Found page.

Here's my Virtual Host.
Code:
<VirtualHost example.com>
  ServerName example.com
  ErrorLog /var/log/httpd/example-error.log
  CustomLog /var/log/httpd/example.log combined
  DocumentRoot /var/www/html/loc1/loc2/loc3/loc4
  <Directory "/var/www/html/loc1/loc2/loc3/loc4/login.php">
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>
Here's the error log.
Code:
[Tue Sep 18 12:18:08 2012] [error] [client x.x.x.x] File does not exist: /var/www/html/loc1/loc2/loc3/loc4/loc1/loc2/loc3/loc4
[Tue Sep 18 12:18:09 2012] [error] [client x.x.x.x] File does not exist: /var/www/html/loc1/loc2/loc3/loc4/favicon.ico
I don't understand the first one, as to why it repeated locations 1 to 4...
Also, what is favicon.ico's purpose?
And oh, I didn't change anything in the httpd.conf file in /etc/httpd/conf directory, and my virtual host file is located in /etc/httpd/conf.d directory.

Thankies~


edit:

I have reinstalled apache, and now I am having this problem.

Code:
PHP Warning:  Smarty error: unable to read resource: "/var/www/html/loc1/loc2/loc3/tmpl/templates/.tpl" in /var/www/html/loc1/loc2/loc3/module/Smarty/Smarty.class.php on line 1095
I have no idea how to fix that one...

Last edited by destinedjagold; 18th September 2012 at 12:50.
Reply With Quote
Sponsored Links
  #2  
Old 21st September 2012, 14:11
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
 
Default

Please check that that path exists and it is accessible to the webserver user.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Hosts problem. 0000000100 Installation/Configuration 1 23rd May 2012 14:16
Virtual hosts Toucan Server Operation 2 15th December 2009 01:15
Fedora 11, ISPconfig and virtual hosts robyoko Installation/Configuration 9 23rd September 2009 18:09
Apache Virtual Hosts - I have never gotten this right. DazzyB Server Operation 2 24th December 2007 13:37
SSL for virtual hosts on one certificate rbartz Tips/Tricks/Mods 8 20th November 2007 17:59


All times are GMT +2. The time now is 20:45.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.