I have installed Xampp on a server with linux for the first time, and I have some problems with my vhosts. I have always used windows before, but I needed some kind of mailing with my new sites...and windows isn't that good for using contact forms etc.. So I decided to install linux which I know have sendmail. Here's the deal
I have a server with Fedora 7 installed, and xampp works great on it...except I can't make the vhosts work. I am not so familiar with the setup in linux, but I have tried the best I can. I always enter the xampp main page (localhost) when I enter one of my domain...why is that? What have I missed? Here are the copies of the files I have
- Code: Select all
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/xampp
ServerName localhost:80
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/main
ServerName www.brueland.net:80
ServerAlias brueland.net
<Directory "/opt/lampp/htdocs/main">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/brueland
ServerName www.brueland.info:80
ServerAlias brueland.info
<Directory "/opt/lampp/htdocs/brueland">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/razor
ServerName www.razorserver.info:80
ServerAlias razorserver.info
<Directory "/opt/lampp/htdocs/razor">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/fp
ServerName www.football-prospects.com:80
ServerAlias football-prospects.com
<Directory "/opt/lampp/htdocs/fp">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/sivakset
ServerName www.sivakset.com:80
ServerAlias sivakset.com
<Directory "/opt/lampp/htdocs/sivakset">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/brueland_no
ServerName www.brueland.no:80
ServerAlias brueland.no
<Directory "/opt/lampp/htdocs/brueland_no">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/overhalla
ServerName www.overhallasiden.info:80
ServerAlias overhallasiden.info
<Directory "/opt/lampp/htdocs/overhalla">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/opdal
ServerName www.opdal-data.no:80
ServerAlias opdal-data.no
<Directory "/opt/lampp/htdocs/opdal">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I haven't made any changes in the httpd.conf file except for enabling for vhosts.
I have setup the domains in the hosts file, though I know I does not need that here on the local machine
I haven't made other changes around, and everything is at original.
What can I do for the vhosts to work?
Thanks in advance
-Tommy
Now I have another problem...
I tried to restart xampp for maybe then apache would reconize the changes I have made in vhosts, but then I got this error:
[root@razorserver ~]# /opt/lampp/lampp restart
Stopping XAMPP for Linux 1.6.2...
XAMPP: Stopping Apache with SSL...
Syntax error on line 35 of /opt/lampp/etc/extra/httpd-vhosts.conf:
DocumentRoot takes one argument, Root directory of the document tree
XAMPP: Stopping MySQL...
XAMPP: Stopping ProFTPD...
XAMPP stopped.
Starting XAMPP for Linux 1.6.2...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Sorry, I've no idea what's going wrong.
XAMPP: Please contact our forum http://community.apachefriends.org/f/
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
[root@razorserver ~]#
Here are line 35...I can't see anything wrong here
Code:
DocumentRoot /opt/lampp/htdocs/main
Thanks in advance
-Tommy