Apache stops working

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Apache stops working

Postby sawroze14 » 16. September 2014 17:03

i am trying to create virtual host so i posted following code in C:\xampp\apache\conf\extra\httpd-vhosts.conf
NameVirtualHost *
<VirtualHost *>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot "C:\Users\sawroze\Desktop\sawroze"
ServerName sawroze
<Directory "C:\Users\sawroze\Desktop\sawroze">
Order allow,deny
Allow from all
</VirtualHost>



after doing this my apache server stops working any help will be appreciated..
sawroze14
 
Posts: 2
Joined: 13. September 2014 16:45
Operating System: windows 8

Re: Apache stops working

Postby JJ_Tagy » 16. September 2014 17:55

What ports are you listening on? What does your apache error log say? The error log will usually let you know if you have a syntax error.

Here is my sample vhost test setup you can use as a reference:
Code: Select all
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot "C:/xampp/htdocs"
    ServerName localhost
    ServerAlias localhost
    ErrorLog "logs/localhost-error.log"
    CustomLog "logs/localhost-access.log" common
    <Directory "C:/xampp/htdocs">
        Require all granted
        AllowOverride All
        Options Indexes FollowSymLinks
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@test1.com
    DocumentRoot "C:/xampp/vhosts/test1"
    ServerName test1.com
    ServerAlias test1.com
    ErrorLog "logs/test1.com-error.log"
    CustomLog "logs/test1.com-access.log" common
    <Directory "C:/xampp/vhosts/test1">
        Require all granted
        AllowOverride All
        Options Indexes FollowSymLinks
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@test2.com
    DocumentRoot "C:/xampp/vhosts/test2"
    ServerName test2.com
    ServerAlias test2.com
    ErrorLog "logs/test2.com-error.log"
    CustomLog "logs/test2.com-access.log" common
    <Directory "C:/xampp/vhosts/test2">
        Require all granted
        AllowOverride All
        Options Indexes FollowSymLinks
    </Directory>
</VirtualHost>

Both my test1.com and test2.com have entries in the Windows hosts file in addition to the existing localhost entry.
JJ_Tagy
 
Posts: 788
Joined: 30. January 2012 13:44
XAMPP version: 5.5.15
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 135 guests