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

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

am 02.06.2007 04:32:16 von thatguyfromnj

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 help would be appreciated.

Thanks!

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

am 02.06.2007 10:33:57 von unknown

Post removed (X-No-Archive: yes)

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

am 02.06.2007 15:58:57 von kwan

On Jun 2, 1:33 am, Davide Bianchi
wrote:
> On 2007-06-02, thatguyfromnj 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

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

am 05.06.2007 03:39:40 von thatguyfromnj

On Jun 2, 4:33 am, Davide Bianchi
wrote:
> On 2007-06-02, thatguyfromnj 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.

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

am 05.06.2007 15:45:43 von mark

thatguyfromnj wrote in news:1181007580.101499.294920
@k79g2000hse.googlegroups.com:

> On Jun 2, 4:33 am, Davide Bianchi
> wrote:
>> On 2007-06-02, thatguyfromnj 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 help us help 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 =----

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

am 05.06.2007 16:05:17 von thatguyfromnj

On Jun 5, 9:45 am, Mark wrote:
> thatguyfromnj wrote in news:1181007580.101499.294920
> @k79g2000hse.googlegroups.com:
>
>
>
>
>
> > On Jun 2, 4:33 am, Davide Bianchi
> > wrote:
> >> On 2007-06-02, thatguyfromnj 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 help us help 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.

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

am 06.06.2007 08:37:15 von unknown

Post removed (X-No-Archive: yes)