11th October 2012, 09:22
Join Date: Aug 2012
Thanked 0 Times in 0 Posts
CentOS - Virtual Host Problem
Hello and good day everyone.
Okay, so here I am again, with my original problem. I will try and provide the much needed information, in hopes that anyone can help me.
I have set up a local LAN-only server with a CentOS PC.
Note: only for local LAN access only.
The server is fine and I can access it when I type the server's static I.P. address.
Now, I wanted to simply type mywebsite.com to access the server, so, since I am using Windows 7 OS PC, I edited my host file located in C:/windows/system32/drivers/etc/hosts .
And with that, I can finally simply type mywebsite.com and I can access the CentOS server.
192.168.1.16 mywebsite.com # CentOS Server
And now, onto the problem...
I have a php file that I needed to be displayed, which is located in var/www/html/location1/location2/location3/location4
Simply typing mywebsite.com/location1/location2/location3/location4 works, but I want the server to directly display the php file located in that location by simply me typing mywebsite.com
I want to directly access a specific php file to be displayed when I type mywebsite.com...
I have written a .conf file for the server located in the /etc/httpd/conf.d with these codes...
I restarted the service httpd, and afterwards, I typed mywebsite.com again, but it instead displays an error with the message
Redirect 404 /favicon.ico
ErrorDocument 404 "No favicon"
The error log displays this...
The requested URL /location1/location2/location3/location4/login.php was not found on this server.
Apache/2.2.15 (CentOS) Server at mywebsite.com Port 80
I don't understand the error log. Why did it displayed location1/location2/location3/location4 twice?
[Thu Oct 11 11:00:26 2012] [error] [client 192.168.1.9] File does not exist: /var/www/html/location1/location2/location3/location4/location1/location2/location3/location4
Any help would greatly appreciated. Thank you.