Page 1 of 1

Using other folder than HTDOCS

PostPosted: 15. October 2009 14:23
by polygone
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?

Re: Using other folder than HTDOCS

PostPosted: 15. October 2009 14:27
by Wiedmann
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"?

Re: Using other folder than HTDOCS

PostPosted: 15. October 2009 14:29
by polygone
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>

Re: Using other folder than HTDOCS

PostPosted: 15. October 2009 14:36
by polygone
I apologize. The error.log keyed me off. Had some discrepancies in the name of the directories.

Re: Using other folder than HTDOCS

PostPosted: 15. October 2009 16:41
by polygone
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>


Re: Using other folder than HTDOCS

PostPosted: 15. October 2009 16:53
by Wiedmann
but, when I try to login, it says object not found.

So your login form is targeting to a wrong location.

Re: Using other folder than HTDOCS

PostPosted: 15. October 2009 16:59
by polygone
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?

Re: Using other folder than HTDOCS

PostPosted: 15. October 2009 17:02
by Wiedmann
SSL are different ip based vhosts (for port 443).