Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have read all the articles but still must be doing something wrong... I modified the httpd-vhosts.conf file to access the project I am working on... I have tried many different configurations and none work. My apache service will not start (I am on Windows 7)... any ideas would be helpful - here is the code I added to the conf file: DocumentRoot "C:/xampp/htdocs" ServerName localhost DocumentRoot C:/xampp/htdocs/socengv1" ServerName socengv1.local

I have also tried this with NameVirtualHost *:80 command with no difference to note.

share|improve this question

3 Answers 3

First;

add port to your ServerName

< VirtualHost *:80 >  
    DocumentRoot C:/server/htdocs  
    ServerName localhost:80   
< /VirtualHost >

Second Chance, give a different name to ServerName and add the ServerName to the windows hosts file, this is located in “C:\windows\system32\drivers\etc\hosts”. Open the file in Notepad and simply add;

127.0.0.1       localhost  
127.0.0.1       urServerName

Also add to check errors;

ErrorLog        ErrorLog @rel_logfiledir@/urServerName-error_log  
share|improve this answer

Go to this link and I you will find the solution in my case it was SQL

How to Solve Port 80 Problems When Running Apache on Windows

share|improve this answer

Remember, logs directory must exist before start server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.