You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by A <am...@gmail.com> on 2022/04/04 15:10:46 UTC

Serve multiple websites (not sub-domains) from port 80

Hi,

I am planning to make changes to Apache web server so that it can serve
multiple websites (not sub-domains) from port 80.

This will save money for someone who has more than one website. That person
need not buy more than one hosting plan, one hosting plan will suffice.

Based on the incoming base URL, Apache web server will decide from which
directory to serve the index file or other files. There will be a user file
where user can list which website is mapped to which directory.

For example:

abcd:com:/abcd
xyz.com:/xyz

I am not familiar with Apache web server code so can someone point me to
few files which I need to modify to implement this feature.

Regards,
Amit

Re: Serve multiple websites (not sub-domains) from port 80

Posted by ku...@gmail.com.
You should use Name based hosting and that will serve your purpose.

On Mon, Apr 4, 2022 at 8:48 PM A <am...@gmail.com> wrote:

> Hi,
>
> I am planning to make changes to Apache web server so that it can serve
> multiple websites (not sub-domains) from port 80.
>
> This will save money for someone who has more than one website. That
> person need not buy more than one hosting plan, one hosting plan will
> suffice.
>
> Based on the incoming base URL, Apache web server will decide from which
> directory to serve the index file or other files. There will be a user file
> where user can list which website is mapped to which directory.
>
> For example:
>
> abcd:com:/abcd
> xyz.com:/xyz
>
> I am not familiar with Apache web server code so can someone point me to
> few files which I need to modify to implement this feature.
>
> Regards,
> Amit
>

Re: [users@httpd] Serve multiple websites (not sub-domains) from port 80

Posted by Nick Folino <ni...@folino.us>.
https://httpd.apache.org/docs/2.4/

On Mon, Apr 4, 2022 at 11:12 AM A <am...@gmail.com> wrote:

> Hi,
>
> I am planning to make changes to Apache web server so that it can serve
> multiple websites (not sub-domains) from port 80.
>
> This will save money for someone who has more than one website. That
> person need not buy more than one hosting plan, one hosting plan will
> suffice.
>
> Based on the incoming base URL, Apache web server will decide from which
> directory to serve the index file or other files. There will be a user file
> where user can list which website is mapped to which directory.
>
> For example:
>
> abcd:com:/abcd
> xyz.com:/xyz
>
> I am not familiar with Apache web server code so can someone point me to
> few files which I need to modify to implement this feature.
>
> Regards,
> Amit
>

Re: [users@httpd] Re: Serve multiple websites (not sub-domains) from port 80

Posted by Frank Gingras <th...@apache.org>.
Sounds like simple Alias directives in the main vhost should suffice.

On Mon, 4 Apr 2022 at 11:17, Eric Covener <co...@gmail.com> wrote:

> On Mon, Apr 4, 2022 at 11:11 AM A <am...@gmail.com> wrote:
> >
> > Hi,
> >
> > I am planning to make changes to Apache web server so that it can serve
> multiple websites (not sub-domains) from port 80.
> >
> > This will save money for someone who has more than one website. That
> person need not buy more than one hosting plan, one hosting plan will
> suffice.
> >
> > Based on the incoming base URL, Apache web server will decide from which
> directory to serve the index file or other files. There will be a user file
> where user can list which website is mapped to which directory.
> >
> > For example:
> >
> > abcd:com:/abcd
> > xyz.com:/xyz
>
> It's hard to interpret what you mean by these examples. What full URL
> would your user use and what would the server do with it?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Re: Serve multiple websites (not sub-domains) from port 80

Posted by Frank Gingras <th...@apache.org>.
Surely it will, but in practice, with shared hosting, you'd assign a single
vhost to each customer.

This is where Alias / AliasMatch comes into play.

On Mon, 4 Apr 2022 at 11:35, Jim Albert <ji...@netrition.com> wrote:

> On 4/4/2022 11:16 AM, Eric Covener wrote:
> > On Mon, Apr 4, 2022 at 11:11 AM A <am...@gmail.com> wrote:
> >> Hi,
> >>
> >> I am planning to make changes to Apache web server so that it can serve
> multiple websites (not sub-domains) from port 80.
> >>
> >> This will save money for someone who has more than one website. That
> person need not buy more than one hosting plan, one hosting plan will
> suffice.
> >>
> >> Based on the incoming base URL, Apache web server will decide from
> which directory to serve the index file or other files. There will be a
> user file where user can list which website is mapped to which directory.
> >>
> >> For example:
> >>
> >> abcd:com:/abcd
> >> xyz.com:/xyz
> > It's hard to interpret what you mean by these examples. What full URL
> > would your user use and what would the server do with it?
> >
> >
>
> I think an understanding of Apache Virtual Hosts or knowing that they
> exist might help.
> https://httpd.apache.org/docs/2.4/vhosts/
>
>
> --
> Jim Albert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Re: Serve multiple websites (not sub-domains) from port 80

Posted by Jens Kallup <ka...@web.de>.
Hello,

Apache2.4 can be configured with IP-based, or Name-based VirtualHost's.
Apache2.4 can handle multiple of such.
But You need to point the Domain.TopLevelDomain to a IP, if You choose
the first plan.
On the second plan, You need to extend configure the Apache2.4 with
DocumentRoot, ServerName, and other settings.
Please, don't go productive, if You don't know what You do !!!
I don't know what OS You running, but firstly, I wouild be advise You
to have a look to XAMPP or LAMPP Server.
Both are Developer Apache2.4 Servers (for Windows, and Linux), You can
train, and "pre-develop" Your web site prasentation.
For more Information's, please consult the docs, You have pointed by others
in this thread.
As next step, You should be configure a bind9 Server.
It is a DNS (Domain Name Server) wich is used to serve Your Domain in
both directions: Server IP <=> Domain Name / Domain IP.
Such server have commonly a shadow copy of Your main server.
So, if one serve fail, You have a fallback Server still the main Server
is working correctly.
As third point are Back-Up's, and so on, and so ...

Hope this helps
Jens Kallup

Am 04.04.2022 um 17:34 schrieb Jim Albert:
> On 4/4/2022 11:16 AM, Eric Covener wrote:
>> On Mon, Apr 4, 2022 at 11:11 AM A <am...@gmail.com> wrote:
>>> Hi,
>>>
>>> I am planning to make changes to Apache web server so that it can
>>> serve multiple websites (not sub-domains) from port 80.
>>>
>>> This will save money for someone who has more than one website. That
>>> person need not buy more than one hosting plan, one hosting plan
>>> will suffice.
>>>
>>> Based on the incoming base URL, Apache web server will decide from
>>> which directory to serve the index file or other files. There will
>>> be a user file where user can list which website is mapped to which
>>> directory.
>>>
>>> For example:
>>>
>>> abcd:com:/abcd
>>> xyz.com:/xyz
>> It's hard to interpret what you mean by these examples. What full URL
>> would your user use and what would the server do with it?
>>
>>
>
> I think an understanding of Apache Virtual Hosts or knowing that they
> exist might help.
> https://httpd.apache.org/docs/2.4/vhosts/
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Serve multiple websites (not sub-domains) from port 80

Posted by Jim Albert <ji...@netrition.com>.
On 4/4/2022 11:16 AM, Eric Covener wrote:
> On Mon, Apr 4, 2022 at 11:11 AM A <am...@gmail.com> wrote:
>> Hi,
>>
>> I am planning to make changes to Apache web server so that it can serve multiple websites (not sub-domains) from port 80.
>>
>> This will save money for someone who has more than one website. That person need not buy more than one hosting plan, one hosting plan will suffice.
>>
>> Based on the incoming base URL, Apache web server will decide from which directory to serve the index file or other files. There will be a user file where user can list which website is mapped to which directory.
>>
>> For example:
>>
>> abcd:com:/abcd
>> xyz.com:/xyz
> It's hard to interpret what you mean by these examples. What full URL
> would your user use and what would the server do with it?
>
>

I think an understanding of Apache Virtual Hosts or knowing that they 
exist might help.
https://httpd.apache.org/docs/2.4/vhosts/


-- 
Jim Albert


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Serve multiple websites (not sub-domains) from port 80

Posted by Eric Covener <co...@gmail.com>.
On Mon, Apr 4, 2022 at 11:11 AM A <am...@gmail.com> wrote:
>
> Hi,
>
> I am planning to make changes to Apache web server so that it can serve multiple websites (not sub-domains) from port 80.
>
> This will save money for someone who has more than one website. That person need not buy more than one hosting plan, one hosting plan will suffice.
>
> Based on the incoming base URL, Apache web server will decide from which directory to serve the index file or other files. There will be a user file where user can list which website is mapped to which directory.
>
> For example:
>
> abcd:com:/abcd
> xyz.com:/xyz

It's hard to interpret what you mean by these examples. What full URL
would your user use and what would the server do with it?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org