vhost returns 404 [solved]
Posted: 16. December 2012 06:00
Hi all
I"m using xampp 1.8.1 and i have a problem in configuring my vhosts in apache
But before that, I'm using windows 7 and i created first a dummy webpage so that I check if there are errors in the vhosts since Im new to xampp
These are the things that I did:
1. I created the hosts file in C:\Windows\System32\drivers\etc\hosts and i named my dummy website "works.localhost.dev"
2. I created the configuration in the vhosts file in C:\xampp\apache\conf\extra\httpd-vhosts.conf
here's the code:
4. Lastly, I saved it and restart the apache
but when I input this dummy url on my browser, it directs me to 404 error saying that object not found. I've check the configurations on my system, it seems I configure it correctly. I also tried to google on how to configure vhosts the right way but unfortunately, I doesnt resolve it. I am struggling from frustration for 5 days just to figure the problem
lastly I check the error.log of apache, i cant resolve it since im a new user of xampp.
kindly check the error:
I wish you can help me. to resolve this. Sorry the bad English.
I"m using xampp 1.8.1 and i have a problem in configuring my vhosts in apache
But before that, I'm using windows 7 and i created first a dummy webpage so that I check if there are errors in the vhosts since Im new to xampp
These are the things that I did:
1. I created the hosts file in C:\Windows\System32\drivers\etc\hosts and i named my dummy website "works.localhost.dev"
- Code: Select all
127.0.0.1 works.localhost.dev
2. I created the configuration in the vhosts file in C:\xampp\apache\conf\extra\httpd-vhosts.conf
here's the code:
- Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/itworks"
ServerName works.localhost.dev
ServerAlias works.localhost.dev
<Directory "C:/xampp/htdocs/itworks">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
4. Lastly, I saved it and restart the apache
but when I input this dummy url on my browser, it directs me to 404 error saying that object not found. I've check the configurations on my system, it seems I configure it correctly. I also tried to google on how to configure vhosts the right way but unfortunately, I doesnt resolve it. I am struggling from frustration for 5 days just to figure the problem
lastly I check the error.log of apache, i cant resolve it since im a new user of xampp.
kindly check the error:
- Code: Select all
[Sun Dec 16 12:39:07.600668 2012] [core:warn] [pid 2076:tid 220] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun Dec 16 12:39:08.167700 2012] [ssl:warn] [pid 2076:tid 220] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Dec 16 12:39:08.240704 2012] [mpm_winnt:notice] [pid 2076:tid 220] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Sun Dec 16 12:39:08.240704 2012] [mpm_winnt:notice] [pid 2076:tid 220] AH00456: Server built: Aug 18 2012 12:41:37
[Sun Dec 16 12:39:08.240704 2012] [core:notice] [pid 2076:tid 220] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sun Dec 16 12:39:08.243705 2012] [mpm_winnt:notice] [pid 2076:tid 220] AH00418: Parent: Created child process 4184
AH00548: NameVirtualHost has no effect and will be removed in the next release C:/xampp/apache/conf/extra/httpd-vhosts.conf:20
[Sun Dec 16 12:39:10.457831 2012] [ssl:warn] [pid 4184:tid 232] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Dec 16 12:39:10.528835 2012] [mpm_winnt:notice] [pid 4184:tid 232] AH00354: Child: Starting 150 worker threads.
I wish you can help me. to resolve this. Sorry the bad English.