Using other folder than HTDOCS

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

Using other folder than HTDOCS

Postby polygone » 15. October 2009 14:23

Hello Everyone,

I am a bit new to this, so please take it easy on me. :) I am trying to set up me xampp at home like I have it set up at work. They don't store the main site under HTDOCS, but instead under a folder called 'vhost'.
In my http-vhosts.conf, I have my virtualhosts set up as such:

Code: Select all
<VirtualHost *:80>
    ServerName www.mysite.com
    ServerAlias mysite.com

   DocumentRoot "C:/xampp/vhost/trunk/htdocs"
</VirtualHost>


When I first tried it, it was blocking me. I fixed that, but it still doesn't seem to be able to find the directory. It comes up as object not found. What am I missing here?
polygone
 
Posts: 5
Joined: 15. October 2009 14:09

Re: Using other folder than HTDOCS

Postby Wiedmann » 15. October 2009 14:27

I fixed that,

How? I don't see this in your config above...

it still doesn't seem to be able to find the directory.

Which "directory"?

It comes up as object not found.

Which "object"?

And of course:
What can you read in the "error.log"?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Using other folder than HTDOCS

Postby polygone » 15. October 2009 14:29

Other useful tidbits:

http.conf
Code: Select all
ServerRoot "C:/xampp/apache"

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>

<Directory "C:/xampp">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks Includes ExecCGI

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>
polygone
 
Posts: 5
Joined: 15. October 2009 14:09

Re: Using other folder than HTDOCS

Postby polygone » 15. October 2009 14:36

I apologize. The error.log keyed me off. Had some discrepancies in the name of the directories.
polygone
 
Posts: 5
Joined: 15. October 2009 14:09

Re: Using other folder than HTDOCS

Postby polygone » 15. October 2009 16:41

OK. new problem. I have everything set up, as far as virtual hosts. I can get to my site, which is located in c:\xampp\vhost, via. http://www.mysite.com. It seems to load the index page fine, but, when I try to login, it says object not found. In the error log, it seems to be looking for the file in c:\xampp\htdocs and not in c:\xampp\vhost\mysite\htdocs. The main index page is in that directory, so I don't see why it can't find the mysite.com/login.php. They're in the same directory.....

Am I missing something in my http-vhost.conf ?

Code: Select all
<VirtualHost *:80>
  ServerAdmin webmaster@localhost
  ServerName localhost
  DocumentRoot "C:/xampp/htdocs"

  <Directory />
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
  </Directory>

  <Directory "C:/xampp/htdocs">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
  </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName www.mysite.com
    ServerAlias mysite.com

     DocumentRoot "C:/xampp/vhost/mysite/htdocs"
 
  <Directory />
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
  </Directory>

  <Directory "C:/xampp/vhost/mysite/htdocs">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
  </Directory>
</VirtualHost>

polygone
 
Posts: 5
Joined: 15. October 2009 14:09

Re: Using other folder than HTDOCS

Postby Wiedmann » 15. October 2009 16:53

but, when I try to login, it says object not found.

So your login form is targeting to a wrong location.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Using other folder than HTDOCS

Postby polygone » 15. October 2009 16:59

Ok it seems to be the SSL that keeps reverting me back to c:\xampp\htdocs..... I tried just doing https://mysite.com and it took me back to the default htdocs. Any ideas on how to make the SSL work?
polygone
 
Posts: 5
Joined: 15. October 2009 14:09

Re: Using other folder than HTDOCS

Postby Wiedmann » 15. October 2009 17:02

SSL are different ip based vhosts (for port 443).
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: Bonniem and 67 guests