Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to create virtual subdomains but apache fails to start after I edit the httpd-vhosts.conf and there are no errors in the error log.

<VirtualHost 127.0.0.1:80>
  ServerAlias *.localhost
  UseCanonicalName Off    
  VirtualDocumentRoot C:/xampp/htdocs/%1
</VirtualHost>

Note: I'm running apache via xampp on windows.

share|improve this question

1 Answer 1

It' my way to create virtual hosts in linux:

<VirtualHost 127.0.0.1>
  DocumentRoot /var/webapps/testphp
  ServerName testphp.home.lan
</VirtualHost>

You may use it (replace DocumentRoot and ServerName) and add

127.0.0.1 testphp.home.lan

in you /etc/hosts (or windows-os c:\windows\system32\drivers\etc\hosts) And check is there "error-switcher" in main apache config. May be your error log is switched-off.

share|improve this answer
    
I'm running on windows, and this is not what I'm searching for... read the question... :\ –  Alen Dec 29 '12 at 15:15
    
ok, replace like this "DocumentRoot C:/xampp/htdocs/testphp" –  carcinogen75 Dec 29 '12 at 17:36

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.