PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > httpd.conf - how to use a single domain with multiple directories
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

httpd.conf - how to use a single domain with multiple directories

Réponse
 
LinkBack Outils de la discussion
Vieux 02/06/2007, 03h32   #1
thatguyfromnj
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut httpd.conf - how to use a single domain with multiple directories

Hello,

I would like to use multiple directories on a subdomain to access
different sites. So for example:

DNS is setup to point to: http://sub.example.com

I need to add the proper rules to httpd.conf so users can get to the
proper sites.

http://sub.example.com/directory1
http://sub.example.com/directory2
http://sub.example.com/directory3

Note that each of the above will have its own document root.

Any would be appreciated.

Thanks!

  Réponse avec citation
Vieux 02/06/2007, 09h33   #2
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: httpd.conf - how to use a single domain with multiple directories

On 2007-06-02, thatguyfromnj <pirigyim@gmail.com> wrote:
> I would like to use multiple directories on a subdomain to access
> different sites. So for example:
>
> DNS is setup to point to: http://sub.example.com


This is as clear as mud... if you want to access different
subdirectories, just uses different subdirectories, the fact that each
subdir has his own 'site' is of no interest for Apache.
Otherwise explain what you mean and what you want to achieve.

> Note that each of the above will have its own document root.


A site can have ONE document root, if you want to use different
subdir, you don't have different sites, you just have different dirs.
You can have different document root if you use different domains
(http://domain1.com, http://domain2.com and so on).

Clear your mind and explain.

Davide

--
Grown-up Operative System: old enough to drink, old enough to vote,
old enough to drive, old enough to fsck
- Brian Kantor and Anthony de Boer on asr
  Réponse avec citation
Vieux 02/06/2007, 14h58   #3
kwan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: httpd.conf - how to use a single domain with multiple directories

On Jun 2, 1:33 am, Davide Bianchi <davideyeahs...@onlyforfun.net>
wrote:
> On 2007-06-02, thatguyfromnj <pirig...@gmail.com> wrote:
>
> > I would like to use multiple directories on a subdomain to access
> > different sites. So for example:

>
> > DNS is setup to point to:http://sub.example.com

>
> This is as clear as mud... if you want to access different
> subdirectories, just uses different subdirectories, the fact that each
> subdir has his own 'site' is of no interest for Apache.
> Otherwise explain what you mean and what you want to achieve.
>
> > Note that each of the above will have its own document root.

>
> A site can have ONE document root, if you want to use different
> subdir, you don't have different sites, you just have different dirs.
> You can have different document root if you use different domains
> (http://domain1.com,http://domain2.comand so on).
>
> Clear your mind and explain.
>
> Davide
>
> --
> Grown-up Operative System: old enough to drink, old enough to vote,
> old enough to drive, old enough to fsck
> - Brian Kantor and Anthony de Boer on asr


search VirtualHost in this furum you get pretty of them

  Réponse avec citation
Vieux 05/06/2007, 02h39   #4
thatguyfromnj
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: httpd.conf - how to use a single domain with multiple directories

On Jun 2, 4:33 am, Davide Bianchi <davideyeahs...@onlyforfun.net>
wrote:
> On 2007-06-02, thatguyfromnj <pirig...@gmail.com> wrote:
>
> > I would like to use multiple directories on a subdomain to access
> > different sites. So for example:

>
> > DNS is setup to point to:http://sub.example.com

>
> This is as clear as mud... if you want to access different
> subdirectories, just uses different subdirectories, the fact that each
> subdir has his own 'site' is of no interest for Apache.
> Otherwise explain what you mean and what you want to achieve.
>
> > Note that each of the above will have its own document root.

>
> A site can have ONE document root, if you want to use different
> subdir, you don't have different sites, you just have different dirs.
> You can have different document root if you use different domains
> (http://domain1.com,http://domain2.comand so on).
>
> Clear your mind and explain.
>
> Davide
>
> --
> Grown-up Operative System: old enough to drink, old enough to vote,
> old enough to drive, old enough to fsck
> - Brian Kantor and Anthony de Boer on asr


Very insightful JO.

  Réponse avec citation
Vieux 05/06/2007, 14h45   #5
Mark
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: httpd.conf - how to use a single domain with multiple directories

thatguyfromnj <pirigyim@gmail.com> wrote in news:1181007580.101499.294920
@k79g2000hse.googlegroups.com:

> On Jun 2, 4:33 am, Davide Bianchi <davideyeahs...@onlyforfun.net>
> wrote:
>> On 2007-06-02, thatguyfromnj <pirig...@gmail.com> wrote:
>>
>> > I would like to use multiple directories on a subdomain to access
>> > different sites. So for example:

>>
>> > DNS is setup to point to:http://sub.example.com

>>
>> This is as clear as mud... if you want to access different
>> subdirectories, just uses different subdirectories, the fact that each
>> subdir has his own 'site' is of no interest for Apache.
>> Otherwise explain what you mean and what you want to achieve.
>>
>> > Note that each of the above will have its own document root.

>>
>> A site can have ONE document root, if you want to use different
>> subdir, you don't have different sites, you just have different dirs.
>> You can have different document root if you use different domains
>> (http://domain1.com,http://domain2.comand so on).
>>
>> Clear your mind and explain.
>>
>> Davide
>>
>> --
>> Grown-up Operative System: old enough to drink, old enough to vote,
>> old enough to drive, old enough to fsck
>> - Brian Kantor and Anthony de Boer on asr

>
> Very insightful JO.
>


Your problem is that Davide is right. I think your thinking is sort of
backwards, and that makes it hard for us to understand exactly what you
are trying to accomplish. More explaination would us you.

Could be that what you are wanting to do can be done through the use of
symbolic links and not with the httpd.conf configuration. But, until we
get more of an idea of what you are wanting it is hard to offer
suggestions.


This may be what you want.....

/usr/local/web/example is the DocumentRoot for http://sub.example.com


>pwd

/usr/local/web/example

>ls -l

drwxrwxrwx directory1 --> /usr/local/web/directory1
drwxrwxrwx directory2 --> /usr/local/web/directory2
drwxrwxrwx directory3 --> /usr/local/web/directory3


This is where directory(1|2|3) are symbolic links to other directories.


The other way to do it is, in fact, in the conf files using the alias
feature.


alias /directory1 /usr/local/web/directory1
alias /directory2 /usr/local/web/directory2
alias /directory3 /usr/local/web/directory3


But again, your terminology used in your post is not standard apache
configuration language that we recognize so we need more information
about what you are trying to accomplish. My suggestions are only based on
what I think you may be trying to do....




--

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  Réponse avec citation
Vieux 05/06/2007, 15h05   #6
thatguyfromnj
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: httpd.conf - how to use a single domain with multiple directories

On Jun 5, 9:45 am, Mark <mtaylor*@*lrim.com> wrote:
> thatguyfromnj <pirig...@gmail.com> wrote in news:1181007580.101499.294920
> @k79g2000hse.googlegroups.com:
>
>
>
>
>
> > On Jun 2, 4:33 am, Davide Bianchi <davideyeahs...@onlyforfun.net>
> > wrote:
> >> On 2007-06-02, thatguyfromnj <pirig...@gmail.com> wrote:

>
> >> > I would like to use multiple directories on a subdomain to access
> >> > different sites. So for example:

>
> >> > DNS is setup to point to:http://sub.example.com

>
> >> This is as clear as mud... if you want to access different
> >> subdirectories, just uses different subdirectories, the fact that each
> >> subdir has his own 'site' is of no interest for Apache.
> >> Otherwise explain what you mean and what you want to achieve.

>
> >> > Note that each of the above will have its own document root.

>
> >> A site can have ONE document root, if you want to use different
> >> subdir, you don't have different sites, you just have different dirs.
> >> You can have different document root if you use different domains
> >> (http://domain1.com,http://domain2.comandso on).

>
> >> Clear your mind and explain.

>
> >> Davide

>
> >> --
> >> Grown-up Operative System: old enough to drink, old enough to vote,
> >> old enough to drive, old enough to fsck
> >> - Brian Kantor and Anthony de Boer on asr

>
> > Very insightful JO.

>
> Your problem is that Davide is right. I think your thinking is sort of
> backwards, and that makes it hard for us to understand exactly what you
> are trying to accomplish. More explaination would us you.
>
> Could be that what you are wanting to do can be done through the use of
> symbolic links and not with the httpd.conf configuration. But, until we
> get more of an idea of what you are wanting it is hard to offer
> suggestions.
>
> This may be what you want.....
>
> /usr/local/web/example is the DocumentRoot forhttp://sub.example.com
>
> >pwd

>
> /usr/local/web/example
>
> >ls -l

>
> drwxrwxrwx directory1 --> /usr/local/web/directory1
> drwxrwxrwx directory2 --> /usr/local/web/directory2
> drwxrwxrwx directory3 --> /usr/local/web/directory3
>
> This is where directory(1|2|3) are symbolic links to other directories.
>
> The other way to do it is, in fact, in the conf files using the alias
> feature.
>
> alias /directory1 /usr/local/web/directory1
> alias /directory2 /usr/local/web/directory2
> alias /directory3 /usr/local/web/directory3
>
> But again, your terminology used in your post is not standard apache
> configuration language that we recognize so we need more information
> about what you are trying to accomplish. My suggestions are only based on
> what I think you may be trying to do....
>
> --
>
> ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----http://www.newsfeeds.comThe #1 Newsgroup Service in the World! 120,000+ Newsgroups
> ----= East and West-Coast Server Farms - Total Privacy via Encryption =----- Hide quoted text -
>
> - Show quoted text -




Thanks Mark. The alias solution did just what I needed. I apologize if
I didn't explain myself clearly in my original message, but I think
Davide could have been a little more cordial in his reply.

  Réponse avec citation
Vieux 06/06/2007, 07h37   #7
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: httpd.conf - how to use a single domain with multiple directories

On 2007-06-05, thatguyfromnj <pirigyim@gmail.com> wrote:
> I didn't explain myself clearly in my original message, but I think
> Davide could have been a little more cordial in his reply.


If you got that as 'uncordial' sorry about that, but I shall point out
that is _you_ that are asking for , so you should be the one that
has to be sure that the question is understandable, not just hoping that
whoever read the message can figure out what the problem is.

Now, at the risk of sounding even more 'uncordial' may I point you
to http://catb.org/~esr/faqs/smart-questions.html ?

Davide

--
Q: How many Linux users does it take to change a lightbulb?
A: Two. One to write the HOWTO-LIGHTBULB-CRONJOB, and another to read
it.
-- Geoff Johnson
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 21h22.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,18220 seconds with 15 queries