OVH Community, your new community space.

How to configure my site to point to sub-directory?


marks
23-06-2009, 17:23
I'm not sure if you're talking about a web hosting package or a dedicated server.

I can tell that for webhosting, that's not possible. The closer you'll get to that is to put an index.html file in the www folder and redirect everything to twhatever folder you want.

For dedicated server, I would say that you just have to change the folder for the document root in the httpd.conf file.

Cheers!

DedicatedPros
23-06-2009, 15:47
Yep, and in the future I'd recommend using hosting with cPanel (such as namecheap.com, hostgator.com, theprimehost.com).

freshwire
23-06-2009, 15:32
Most people on this forum are using dedicated servers so can't really offer the support needed to help with hosting plan specific matters. You might have more luck asking ovh.

vidaubannais
23-06-2009, 14:49
Still, I don't have a clear answer to my question :-( I am looking into OVH's help docs but without luck ...

freshwire
23-06-2009, 14:35
For the previous commenter: You can have the websites in any folder (no rules) ^

"/tmp/root/crazy-path/this is\a linux path with a backslash!/www/"

DedicatedPros
23-06-2009, 14:17
I'm no Linux guru, but wouldn't you have to create multiple domains on your server, and then each individual domain would have the www folder inside them? For example:

Code:
/domain1.com/www
/domain2.com/www
/domain3.com/www
I know that's how its done in cPanel/Plesk, but it might be different if you manage the web server via ssh.

vidaubannais
23-06-2009, 13:47
The pbm is not how to access the forum:- /www/forum -> www.mysite.com/forum I am happy with this, furthermore it is accessible via a subdomain forum.mysite.com

My issue is that I would like www.mysite.com to point to /www/mysite instead of /www as it is the case now. Because I will have a few domains on the same site I cannot simply e.g. $mv /www/mysite/ /www
I need a way to somehow "plug" www.mysite.com to /www/mysite

@Myatu: Thanks for your answer but I don't have access to the apache configuration file that I am aware of (I have 240 plan hosting package).

Any idea???

Myatu
23-06-2009, 12:59
If you're using Apache as the web server, you can use the "Alias" option.

For example:

Code:

  ...

  Alias /forum /www/forum

  
    Option Indexes FollowSymLinks

    # If, for example, index.php is the main page:
    DirectoryIndex index.php
  
Have a look at http://httpd.apache.org/docs/2.0/mod/mod_alias.html for the full details on how to properly configure your files.

DedicatedPros
23-06-2009, 12:32
Andy is right, its just a folder inside your primary domain, so move it to /www/mysite/forum and they'll be able to access it without a problem

Andy
23-06-2009, 10:56
If you want to do that, simply move the /www/forum folder to /www/mysite/forum. Easy.

N.B. You might have to change some config options for the forum so it knows where its located. Most ask where its scripts are located in relation to the main host. In your case it would be then be /forum.

vidaubannais
23-06-2009, 10:16
Hello,

I have a site, letīs say www.mysite.com.

In my server my site is located under /www/mysite
On the same site I have a forum that is under /www/forum

I would like the visitors to access my site as follows:-

/www/mysite -> www.mysite.com
/www/forum -> www.mysite.com/forum

How do I do this?

Thanks!