logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Newbie-Q ? - Virtual Hosts
Author
apche_it



Joined: 09 Jun 2009
Posts: 5

PostPosted: Tue 09 Jun '09 17:17    Post subject: Newbie-Q ? - Virtual Hosts Reply with quote

Hello everyone.

Maybe someone can me point to the right direction with a litle prob as an
Apache-Newbie?

Using Xampp on a win2003-Box. (PHP5 and MySQL active)

2 domains to be hosted. mein-musikserver.de and mysticc.de
Works as long I put the address in form: www.mein-musikserver.de/jinzora2 and www.mein-musikserver.de/mysticc
(Using DynDNS, personal server at home without fixed IP)

When using Virtual Hosts I see something weird (at least for me)

www.mysticc.de works, a small private homepage with PHP.
www.mein-musikserver.de loads, (this is Jinzora, a music-streaming-server) but then does not show all elements, and several subpages give "Object not found"

Error-log writes:
" .... file does not exist c:/xampplite/htdocs/jinzora2/jinzora2, referer: http://www.mein.musikserver.de

Virtual host looks like:
<VirtualHost *:80>
DocumentRoot "C:/xampplite/htdocs/jinzora2"
Servername mein-musikserver.de
</VirtualHost>

I see jinzora2 twice in the error-log, although the path is c:/xampplite/htdocs/jinzora2

So, where would be the most promising place to look first.
Permissions or some wrong directives?

Any small tip in what direction to go welcome Smile
Thank you
K.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 09 Jun '09 17:39    Post subject: Reply with quote

if you set up a vhost the normal host get lost.
So you need to setup two vhost Wink

Code:

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot c:/xampplite/www_musik
    ServerName www.mein-musikserver.de
    ErrorLog /server2/logs/musik.error.log
    CustomLog c:/xampplite/logs/musik.access.log common
<Directory "c:/xampplite/www_wtnet">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>


<VirtualHost *:80>
    DocumentRoot c:/xampplite/www_mysticc
    ServerName www.mysticc.de
    ErrorLog /server2/logs/mysticc.error.log
    CustomLog c:/xampplite/logs/mysticc.access.log common
<Directory "c:/xampplite/www_mysticc">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>


Last edited by James Blond on Thu 11 Jun '09 9:38; edited 1 time in total
Back to top
apche_it



Joined: 09 Jun 2009
Posts: 5

PostPosted: Tue 09 Jun '09 18:37    Post subject: Reply with quote

In fact i have 2 vhost
Just put in the first one as example.

This is what is now in vhost-conf

Code:

<VirtualHost *:80>
DocumentRoot "C:/xampplite/htdocs/jinzora2"
ServerName www.mein-musikserver.de
ServerAlias mein-musikserver.de
<Directory "c:/xampplite/htdocs/jinzora2">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>


<VirtualHost *:80>
DocumentRoot "C:/xampplite/htdocs/mysticc"
ServerName www.mysticc.de
ServerAlias mysticc.de
<Directory "c:/xampplite/htdocs/mysticc">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>


When not using vhost but giving www.mein-musikserver.de/jinzora2 site is working as expected. Same for 2nd domain mysticc, but this one is working as expected even with vhost.
Back to top
apche_it



Joined: 09 Jun 2009
Posts: 5

PostPosted: Tue 09 Jun '09 18:53    Post subject: Reply with quote

Did try something.

As the error.log gives
" .... file does not exist c:/xampplite/htdocs/jinzora2/jinzora2, referer: http://www.mein.musikserver.de"

I simply created the directory jinzora2 a second time under c:/xampplite/htdocs/jinzora2 and site now works as expected.

So question remains: From where does apache "think" the request has to be fulfilled from ../jinzora2/jinozora2 , ( but only for content not in the root of .../htdocs/jinzora2, ... .just a guess, but it looks like this)
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 09 Jun '09 21:47    Post subject: Reply with quote

Maybe it is coused by your html code. Can you post the html part which cuases the error.
Back to top
apche_it



Joined: 09 Jun 2009
Posts: 5

PostPosted: Wed 10 Jun '09 5:48    Post subject: Reply with quote

The same code worked on several other machines and dozens of installations, so unlikely to be the cause.

One guess - maybe I started the installation from the sub by accident - I remember I created it to do a copy of the whole installation for testing, and afterwards deleted it. Maybe the path is somewhere stored in a config file of Jinzora. Already did a text-search in files, but with no result.

Looking at the page with Firebug does not show any code with .../jinzora2/jintora2

However. will do a new install of the jinzora to be see whether this is an Apache-problem or something out of Jinzora.
Back to top
apche_it



Joined: 09 Jun 2009
Posts: 5

PostPosted: Wed 10 Jun '09 11:13    Post subject: Reply with quote

Did a new install of Jinzora and now it runs fine.
So problem came from jinzora, not from Apache and Vhost-configuration.

Thanks for your replies.

K.
Back to top


Reply to topic   Topic: Newbie-Q ? - Virtual Hosts View previous topic :: View next topic
Post new topic   Forum Index -> Apache