Multiple Domain Troubles

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

Multiple Domain Troubles

Postby frenzy » 12. November 2008 00:52

Hello,
I finally got to the point where i broke apache, and it gives me this error:
Code: Select all
Starting XAMPP for Linux 1.6.8a...
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: XAMPP-MySQL is already running.
XAMPP: XAMPP-ProFTPD is already running.
XAMPP for Linux started.


the only files i have been changing are /etc/hosts:
Code: Select all
127.0.0.1       localhost
127.0.1.1       endgame.sonic.net       endgame

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


and /opt/lampp/etc/extra/httpd-vhosts.conf
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 crystalmath.org>
    DocumentRoot /opt/lampp/htdocs/crystalmath.org
    ServerName crystalmath.org
    ErrorLog opt/lampp/htdocs/crystalmath.org/error_log
    CustomLog opt/lampp/htdocs/crystalmath.org/access_log common
</VirtualHost>

<VirtualHost frenzy.twilightparadox.com>
    DocumentRoot /opt/lampp/htdocs/frenzy.twilightparadox.com
    ServerName frenzy.twilightparadox.com
    ErrorLog logs/frenzy.twilightparadox.com-error_log
    CustomLog logs/frenzy.twilightparadox.com-access_log common
</VirtualHost>


Please help me set up these two sites and fix apache, i have the DNS of both of these pointing to the external ip for my server.
frenzy
 
Posts: 5
Joined: 12. November 2008 00:30

Postby Wiedmann » 12. November 2008 00:54

error.log/apachestart.log?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby frenzy » 12. November 2008 00:56

where is that file?
frenzy
 
Posts: 5
Joined: 12. November 2008 00:30

Postby glitzi85 » 12. November 2008 12:42

frenzy wrote:where is that file?

Where you defined it with the ErrorLog-Directive. The main error log file for Apache (where he will write errors if he can not come up) is in /opt/lampp/logs

And change your VirtualHosts Block:

Code: Select all
<VirtualHost *:80>
    DocumentRoot /opt/lampp/htdocs/crystalmath.org
    ServerName crystalmath.org
    ErrorLog opt/lampp/htdocs/crystalmath.org/error_log
    CustomLog opt/lampp/htdocs/crystalmath.org/access_log common
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /opt/lampp/htdocs/frenzy.twilightparadox.com
    ServerName frenzy.twilightparadox.com
    ErrorLog logs/frenzy.twilightparadox.com-error_log
    CustomLog logs/frenzy.twilightparadox.com-access_log common
</VirtualHost>


Don't forget to add an localhost-Block if you need localhost.

glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Postby frenzy » 14. November 2008 00:50

so i checked apachestart.log and got:

Code: Select all
[Thu Nov 13 15:44:00 2008] [warn] NameVirtualHost *:80 has no VirtualHosts


what do i do now?
frenzy
 
Posts: 5
Joined: 12. November 2008 00:30

Postby Wiedmann » 14. November 2008 01:09

what do i do now?

The parameters for VirtualHost must be the same as the parameter for NameVirtualHost (see the example from glitzi85).
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby frenzy » 14. November 2008 01:37

i put in his example into the file, no dice.
frenzy
 
Posts: 5
Joined: 12. November 2008 00:30

Postby Wiedmann » 14. November 2008 09:57

no dice.

error/apachestart.log?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby frenzy » 14. November 2008 17:58

/opt/lampp/error/ does not have an apachestart.log

here is my current file with the changes:

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/crystalmath.org
    ServerName crystalmath.org
    ErrorLog opt/lampp/htdocs/crystalmath.org/error_log
    CustomLog opt/lampp/htdocs/crystalmath.org/access_log common
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /opt/lampp/htdocs/frenzy.twilightparadox.com
    ServerName frenzy.twilightparadox.com
    ErrorLog logs/frenzy.twilightparadox.com-error_log
    CustomLog logs/frenzy.twilightparadox.com-access_log common
</VirtualHost>



the only way i can get Apache to work is by deleting all the virtual host blocks.
frenzy
 
Posts: 5
Joined: 12. November 2008 00:30

Postby Wiedmann » 14. November 2008 18:10

/opt/lampp/error/ does not have an apachestart.log

IMHO this file is in another directory.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby glitzi85 » 14. November 2008 20:07

@Wiedmann: Your question for error/apachestart.log was a little bit misleading :-)

@frenzy: Post the content of this files:

Code: Select all
/opt/lampp/logs/apachestart.log
/opt/lampp/logs/error_log


glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 5 guests