Apache cannot start when setup xampp\htdocs

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

Apache cannot start when setup xampp\htdocs

Postby phicha » 28. June 2006 17:54

please someone help me
i set my vhost like this.

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot d:/internet/bitsmikro
ServerName localhost.bitsmikro.com
</VirtualHost>
<Directory "d:/internet/bitsmikro">
AllowOverride None
Options IncludesNoExec
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en
</Directory>
<VirtualHost *:80>
DocumentRoot d:/internet/bitsmikro2
ServerName localhost.bitsmikro2.com
</VirtualHost>
<Directory "d:/internet/bitsmikro2">
AllowOverride None
Options IncludesNoExec
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en
</Directory>
<VirtualHost *:80>
DocumentRoot c:\Program Files\xampp\htdocs
ServerName localhost
</VirtualHost>
<Directory "c:\Program Files\xampp\htdocs">
AllowOverride None
Options IncludesNoExec
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en
</Directory>

my apache cannot start. but after i delete
<VirtualHost *:80>
DocumentRoot c:\Program Files\xampp\htdocs
ServerName localhost
</VirtualHost>
<Directory "c:\Program Files\xampp\htdocs">
AllowOverride None
Options IncludesNoExec
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en
</Directory>

my apache start properly.
whats wrong ??
Hello there, See u later then.
phicha
 
Posts: 3
Joined: 26. June 2006 08:02

Postby WooshMan » 28. June 2006 21:12

Try a vhosts like this:

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot d:/xampp/xampp/htdocs
ServerName localhost
</VirtualHost>

###########################################
<VirtualHost *:80>
ServerName www.domain1.co.uk
ServerAlias domain1.co.uk *.domain1.co.uk
ServerAdmin admin@domain1.co.uk
DocumentRoot d:/web/www.domain1.co.uk

Alias /cgi-bin/ "d:/web/www.domain1.co.uk/cgi-bin/"

<Directory "d:/web/www.domain1.co.uk">
Options ExecCGI Includes FollowSymLinks
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

###########################################



<VirtualHost *:80>
ServerName www.domain2.co.uk
ServerAlias domain2.co.uk *.domain2.co.uk
ServerAdmin admin@domain2.co.uk
DocumentRoot d:/web/www.domain2.co.uk

Alias /cgi-bin/ "d:/web/www.domain2.co.uk/cgi-bin/"

<Directory "d:/web/www.domain2.co.uk">
Options ExecCGI Includes FollowSymLinks
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
####################################

The above also covers any alias that I may need for that domain.

Hope that helps

Woosh
WooshMan
 
Posts: 33
Joined: 10. November 2005 23:03

Postby phicha » 29. June 2006 02:04

but my xampp directory is not on d:/xampp/xampp/htdocs but c:\Program Files\xampp\htdocs
Hello there, See u later then.
phicha
 
Posts: 3
Joined: 26. June 2006 08:02

Postby WorldDrknss » 29. June 2006 03:54

Make sure to have the following files and folders in your root directory before using the following code, unless apache will not start.
logs - folder
errors - folder
cgi-bin - folder
.htaccess - file

Code: Select all
<VirtualHost *:80>
ServerName localhost.bitsmikro.com
ServerAdmin admin@localhost.bitsmikro.com
ServerAlias www.localhost.bitsmikro.com
DocumentRoot d:/internet/bitsmikro
<Directory "d:/internet/bitsmikro">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "d:/internet/bitsmikro">
Options Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddHandler server-parsed .html .htm .shtml .shtm
</Directory>
HostnameLookups Off
ErrorLog d:/internet/bitsmikro/logs/error.log
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog d:/internet/bitsmikro/logs/access.log combined
ServerSignature On
ScriptAlias /cgi-bin/ "d:/internet/bitsmikro/cgi-bin/"
<Directory "d:/internet/bitsmikro/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.php index.html index.htm index.shtml index.shtm
AccessFileName .htaccess
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>
AddHandler cgi-script .cgi
<IfModule mod_negotiation>
<IfModule mod_include>
Alias /errors/ "d:/internet/bitsmikro/errors/"
<Directory "d:/internet/bitsmikro/errors">
AllowOverride None
Options IncludesNoExec
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en
</Directory>
</IfModule>
</IfModule>
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 405 /errors/405.html
ErrorDocument 408 /errors/408.html
ErrorDocument 410 /errors/410.html
ErrorDocument 411 /errors/411.html
ErrorDocument 412 /errors/412.html
ErrorDocument 413 /errors/413.html
ErrorDocument 414 /errors/414.html
ErrorDocument 415 /errors/415.html
ErrorDocument 500 /errors/500.html
ErrorDocument 501 /errors/501.html
ErrorDocument 502 /errors/502.html
ErrorDocument 503 /errors/503.html
ErrorDocument 506 /errors/506.html
</VirtualHost>

<VirtualHost *:80>
ServerName localhost.bitsmikro2.com
ServerAdmin admin@localhost.bitsmikro2.com
ServerAlias www.localhost.bitsmikro2.com
DocumentRoot d:/internet/bitsmikro2
<Directory "d:/internet/bitsmikro2">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "d:/internet/bitsmikro2">
Options Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddHandler server-parsed .html .htm .shtml .shtm
</Directory>
HostnameLookups Off
ErrorLog d:/internet/bitsmikro2/logs/error.log
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog d:/internet/bitsmikro2/logs/access.log combined
ServerSignature On
ScriptAlias /cgi-bin/ "d:/internet/bitsmikro2/cgi-bin/"
<Directory "d:/internet/bitsmikro2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.php index.html index.htm index.shtml index.shtm
AccessFileName .htaccess
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>
AddHandler cgi-script .cgi
<IfModule mod_negotiation>
<IfModule mod_include>
Alias /errors/ "d:/internet/bitsmikro2/errors/"
<Directory "d:/internet/bitsmikro2/errors">
AllowOverride None
Options IncludesNoExec
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en
</Directory>
</IfModule>
</IfModule>
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 405 /errors/405.html
ErrorDocument 408 /errors/408.html
ErrorDocument 410 /errors/410.html
ErrorDocument 411 /errors/411.html
ErrorDocument 412 /errors/412.html
ErrorDocument 413 /errors/413.html
ErrorDocument 414 /errors/414.html
ErrorDocument 415 /errors/415.html
ErrorDocument 500 /errors/500.html
ErrorDocument 501 /errors/501.html
ErrorDocument 502 /errors/502.html
ErrorDocument 503 /errors/503.html
ErrorDocument 506 /errors/506.html
</VirtualHost>

<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/Program Files/xampp/htdocs"
</VirtualHost>
http://wdguides.org - XAMPP Tutorials & MORE!!!!
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby phicha » 29. June 2006 08:28

it seem more trouble iam occured,
after i am update my httpd-vhost.conf, and i check again my hosts.

i'm only browsing localhost.bitsmikro.com
when i was typing localhost, its browsing localhost.bitsmikro.com too also
the same also for localhost.bitsmikro2.com

please help me once more :oops:
Hello there, See u later then.
phicha
 
Posts: 3
Joined: 26. June 2006 08:02


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 97 guests