Page 1 of 1

Multiple Domain Troubles

PostPosted: 12. November 2008 00:52
by frenzy
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.

PostPosted: 12. November 2008 00:54
by Wiedmann
error.log/apachestart.log?

PostPosted: 12. November 2008 00:56
by frenzy
where is that file?

PostPosted: 12. November 2008 12:42
by glitzi85
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

PostPosted: 14. November 2008 00:50
by frenzy
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?

PostPosted: 14. November 2008 01:09
by Wiedmann
what do i do now?

The parameters for VirtualHost must be the same as the parameter for NameVirtualHost (see the example from glitzi85).

PostPosted: 14. November 2008 01:37
by frenzy
i put in his example into the file, no dice.

PostPosted: 14. November 2008 09:57
by Wiedmann
no dice.

error/apachestart.log?

PostPosted: 14. November 2008 17:58
by frenzy
/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.

PostPosted: 14. November 2008 18:10
by Wiedmann
/opt/lampp/error/ does not have an apachestart.log

IMHO this file is in another directory.

PostPosted: 14. November 2008 20:07
by glitzi85
@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