You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by o1bigtenor <o1...@gmail.com> on 2020/01/25 01:58:36 UTC
[users@httpd] Configuration question
Greetings
Am a noob at server setup installation and configuration.
Running on a Debian 10 Buster box set up as a LAMP stack using versions
1. Debian 10 (Buster)
2. Apache 2.4.38
3. Mariadb 10.3
4. PHP 7.3.11
Being a noob I've been using documents to guide me in the setup and
the configuration of my stack. History has shown me that I'm quite
good at finding some kind of weird way of really confusing things so
all this work is being done on a test system - - - meaning that if
things get bad enough I would just blow the whole system and
everything away and start over but even struggling through all the
'joys' of figuring out the arcanities of how and what - - - - well
that's part of the learning process.
So my first server software install I did to 'localhost' (this is
after all experimental but with the possibility of use after
successful installation/configuration/etc). All software to be served
is for in-house use only. This is not meant to be a server for use
from the outside world This first software wants to be accessed from
the browser as localhost/xxxx. This means that
/etc/apache2/sites-available/000-default.conf reads (one line
anyway): DocumentRoot /var/www/html. The problem is that the second
program wants DocumentRoot /var/www/html commented out and
DocumentRoot /var/www/yyyyy/web put in its place.
I would assume that would mean that apache would no longer be serving
program xxxx the way it wants to be.
Is there a way of resolving this impass?
I'm not at all skilled enough to plan out something that would work.
Maybe I need to change the settings for both programs.
Suggestions, please?
TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by Tom Browder <to...@gmail.com>.
On Thu, Jan 30, 2020 at 09:31 o1bigtenor <o1...@gmail.com> wrote:
> On Wed, Jan 29, 2020 at 5:28 PM Tom Browder <to...@gmail.com> wrote:
...
>
> > > > But I'm in the process of putting most of the config online. I'll put
> > > > my main macro first.
> >
> > And for the whole conf directory see this:
> >
> > https://github.com/tbrowder/apache-httpd-tidbits/tree/master/conf
> >
> Thank you very very much for sharing!!!
>
You're very welcome--I'm glad it's helpful.
Be warned that the reverse proxy macro hasn't been tested yet. But I hope
to be able to do so soon.
-Tom
Re: [users@httpd] Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
On Wed, Jan 29, 2020 at 5:28 PM Tom Browder <to...@gmail.com> wrote:
>
> On Wed, Jan 29, 2020 at 3:34 PM Tom Browder <to...@gmail.com> wrote:
> > On Wed, Jan 29, 2020 at 11:47 AM Tom Browder <to...@gmail.com> wrote:
> > > > >...
> > > But I'm in the process of putting most of the config online. I'll put
> > > my main macro first.
>
> And for the whole conf directory see this:
>
> https://github.com/tbrowder/apache-httpd-tidbits/tree/master/conf
>
Thank you very very much for sharing!!!
I had the joy of finding that a log file .xsession-errors had blown
up to where I
had an unresponsive system. So that will put a crimp in things for a few days.
Will be finishing my server setup some time over the next few days - -
- thinking
that these example files will help what I'm trying to do a LOT.
Looking at a working
example that has more than any one specific part I have found to be
quite useful
in setting up new or different things.
Again thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by Tom Browder <to...@gmail.com>.
On Wed, Jan 29, 2020 at 3:34 PM Tom Browder <to...@gmail.com> wrote:
> On Wed, Jan 29, 2020 at 11:47 AM Tom Browder <to...@gmail.com> wrote:
> > > >...
> > But I'm in the process of putting most of the config online. I'll put
> > my main macro first.
And for the whole conf directory see this:
https://github.com/tbrowder/apache-httpd-tidbits/tree/master/conf
-Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by Tom Browder <to...@gmail.com>.
On Wed, Jan 29, 2020 at 11:47 AM Tom Browder <to...@gmail.com> wrote:
> > >...
> But I'm in the process of putting most of the config online. I'll put
> my main macro first.
See the following for my main vhost macro:
https://github.com/tbrowder/apache-httpd-tidbits/blob/master/MACROS.md
-Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by Tom Browder <to...@gmail.com>.
On Wed, Jan 29, 2020 at 9:20 AM o1bigtenor <o1...@gmail.com> wrote:
> On Wed, Jan 29, 2020 at 7:14 AM Tom Browder <to...@gmail.com> wrote:
> > https://www.ssllabs.com/ssltest/
> >
> > Check one of my sites and see for yourself:
> >
> > https://freestatesofamerica.org
> >
> (Grin) Didn't find that there was anything I could 'do' there.
Nope, it's a purely static site. The point was my setup provides A+
security using https, which you can confirm by putting its name into
the testing window at SSL Labs..
But I'm in the process of putting most of the config online. I'll put
my main macro first.
-Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
On Wed, Jan 29, 2020 at 7:14 AM Tom Browder <to...@gmail.com> wrote:
>
> On Tue, Jan 28, 2020 at 13:07 o1bigtenor <o1...@gmail.com> wrote:
> > On Tue, Jan 28, 2020 at 9:49 AM Eric Covener <co...@gmail.com> wrote:
> > > > How can I have different document roots for various applications on the
> > > > same server?
> > > virtual hosts.
> >
> > Thanking you for your assistance. To those others that had also responded
> > - - - thank you - - - - I hope that this set of exchanges might be useful to
> > someone else - - - - at least someday.
> ...
>
> I feel your pain. I have a working website with multiple virtual hosts
> and will be happy to share my setup (sanitized a bit) in a public
> place if you're interested. The examples in the Apache docs don't show
> the full power of using macros for secure and working https-only
> websites.
>
> My virtual websites all get A+ grades at the SSL Labs site here:
>
> https://www.ssllabs.com/ssltest/
>
> Check one of my sites and see for yourself:
>
> https://freestatesofamerica.org
>
(Grin) Didn't find that there was anything I could 'do' there.
I would be quite interested in seeing such 'config' files.
Am finding that vi (or vim or however you call it) has this quite
neat way of removing all xxxxx and replacing with yyyyy.
Thanking you for your willingness to share!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by Tom Browder <to...@gmail.com>.
On Tue, Jan 28, 2020 at 13:07 o1bigtenor <o1...@gmail.com> wrote:
> On Tue, Jan 28, 2020 at 9:49 AM Eric Covener <co...@gmail.com> wrote:
> > > How can I have different document roots for various applications on the
> > > same server?
> > virtual hosts.
>
> Thanking you for your assistance. To those others that had also responded
> - - - thank you - - - - I hope that this set of exchanges might be useful to
> someone else - - - - at least someday.
...
I feel your pain. I have a working website with multiple virtual hosts
and will be happy to share my setup (sanitized a bit) in a public
place if you're interested. The examples in the Apache docs don't show
the full power of using macros for secure and working https-only
websites.
My virtual websites all get A+ grades at the SSL Labs site here:
https://www.ssllabs.com/ssltest/
Check one of my sites and see for yourself:
https://freestatesofamerica.org
HTH
-Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
On Tue, Jan 28, 2020 at 9:49 AM Eric Covener <co...@gmail.com> wrote:
>
> > How can I have different document roots for various applications on the
> > same server?
>
> virtual hosts.
Thanking you for your assistance. To those others that had also responded
- - - thank you - - - - I hope that this set of exchanges might be useful to
someone else - - - - at least someday.
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by Eric Covener <co...@gmail.com>.
> How can I have different document roots for various applications on the
> same server?
virtual hosts.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
On Tue, Jan 28, 2020 at 9:23 AM Richard
<li...@listmail.innovate.net> wrote:
>
>
>
> > Date: Monday, January 27, 2020 22:21:30 -0700
> > From: "@lbutlr" <kr...@kreme.com>
> >
> >> On 27 Jan 2020, at 19:27, Richard wrote:
> >>
> >> If you're trying to serve your content via http, which appears to
> >> be your goal, then to serve it out on different ports - without
> >> using the apache virtual host configuration - you'd need to have
> >> multiple instances of apache running. That's possible, but very
> >> ugly.
> >
> > Is this a change in recent versions? I recall using apache in the
> > past to server pages on port 80 and 8080 and 8081 all from the same
> > conf file.
> >
> > I mean, I am reasonably sure it was apache, though it was quite a
> > long time ago (1.3 days, probably)
>
> Yes, you can serve content on different ports, without benefit of
> virtual hosts, but can you serve different content - i.e., have
> different document roots? It's very possible that my memory is foggy
> on this. [I do find things like :8080 to be very confusing to users
> so avoid that approach.]
>
>
Thank you - - - - - I seem to have come full circle. In trying to install the
second application on my server I found that applicationb wanted exactly
that - - - - a different document root. This, to me at least, confusing journey
is a trying to solve exactly that.
How can I have different document roots for various applications on the
same server?
(Hopefully this is a 'better' question!)
TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by Richard <li...@listmail.innovate.net>.
> Date: Monday, January 27, 2020 22:21:30 -0700
> From: "@lbutlr" <kr...@kreme.com>
>
>> On 27 Jan 2020, at 19:27, Richard wrote:
>>
>> If you're trying to serve your content via http, which appears to
>> be your goal, then to serve it out on different ports - without
>> using the apache virtual host configuration - you'd need to have
>> multiple instances of apache running. That's possible, but very
>> ugly.
>
> Is this a change in recent versions? I recall using apache in the
> past to server pages on port 80 and 8080 and 8081 all from the same
> conf file.
>
> I mean, I am reasonably sure it was apache, though it was quite a
> long time ago (1.3 days, probably)
Yes, you can serve content on different ports, without benefit of
virtual hosts, but can you serve different content - i.e., have
different document roots? It's very possible that my memory is foggy
on this. [I do find things like :8080 to be very confusing to users
so avoid that approach.]
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Configuration question
Posted by "@lbutlr" <kr...@kreme.com>.
On 27 Jan 2020, at 19:27, Richard <li...@listmail.innovate.net> wrote:
> If you're trying to serve your content via http, which appears to be
> your goal, then to serve it out on different ports - without using
> the apache virtual host configuration - you'd need to have multiple
> instances of apache running. That's possible, but very ugly.
Is this a change in recent versions? I recall using apache in the past to server pages on port 80 and 8080 and 8081 all from the same conf file.
I mean, I am reasonably sure it was apache, though it was quite a long time ago (1.3 days, probably)
--
When a distinguished but elderly scientist states that something is
possible, he is almost certainly right. When he states that
something is impossible, he is probably wrong.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
On Tue, Jan 28, 2020 at 8:26 AM Eric Covener <co...@gmail.com> wrote:
>
> On Tue, Jan 28, 2020 at 9:18 AM o1bigtenor <o1...@gmail.com> wrote:
> >
> > On Tue, Jan 28, 2020 at 7:21 AM Eric Covener <co...@gmail.com> wrote:
> > >
> > > > So I'm coming back to my previous question - - - - how do I set up different
> > > > FQDNs (hostnames) on 'one' machine?
> > >
> > > On your client you test from? Edit /etc/hosts and make up whatever
> > > hosts you want.
> > > For other users? Actually setup the hostnames you need to all point to
> > > the same IP.
> > >
> > OK this I've experimented with.
> > If I edit the /etc/hosts file I can add any number of names and they
> > all resolve
> > to localhost (or the machine but they all resolve to the same place).
> > When I change
> > the hostname - - - - the FQDN - - - - well I don't see how there is
> > more than one
> > option for that. So when an application complains that there isn't an
> > 'appropriate'
> > FQDN (or whatever the actual wording in the complaint was) then the hostname
> > or FQDN was 'not' set.
> >
> > So I can set up /etc/hosts like:
> > 192.168.1.2 white
> > 192.168.1.2 yellow
> > 192.168.1.2 green
> > 192.168.1.2 red
> > and I have different hosts. But my FQDN is still 'pink' well that
> > doesn't seem to work.
> >
> > So what could I do to resolve this issue?
> >
> > I cannot use 192.168.1.2 for my FQDN.
> > I do not know how to have more than one FQDN.
> >
> > Do I change my machines FQDN to pink.com and then use the other hosts
> > in /etc/hosts?
> >
>
> You can make up FQDN's in /etc/hosts the same way and they'll also
> resolve for your clients and be matchable by name-based virtual hosts.
>
> The machines notion of its own single FQDN is not relevant to 99% of
> httpd configurations. It's only relevant if you omit the ServerName
> directive and the server has to guess.
>
I think I understand but - - - - - read the man page for hostname where it
states:
The recommended method of setting the FQDN is to make the hostname be
an alias for the fully qualified name using /etc/hosts, DNS, or NIS.
For example,
if the hostname was "ursula", one might have a line in /etc/hosts which reads
127.0.1.1 ursula.example.com ursula
so what I could do is, using my previous information, set the FQDN to be
pink.com so that /etc/hosts would include:
192.168.1.2 pink.com pink
192.168.1.2 pink.com red
192.168.1.2 pink.com green etc
and then I could use vhosting so that to the applications that they
are hosted on:
192.168.1.2 pink.com red applicationa
192.168.1.2 pink.com green applicationb etc
Would that be an 'acceptable way of doing this?
TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by Eric Covener <co...@gmail.com>.
On Tue, Jan 28, 2020 at 9:18 AM o1bigtenor <o1...@gmail.com> wrote:
>
> On Tue, Jan 28, 2020 at 7:21 AM Eric Covener <co...@gmail.com> wrote:
> >
> > > So I'm coming back to my previous question - - - - how do I set up different
> > > FQDNs (hostnames) on 'one' machine?
> >
> > On your client you test from? Edit /etc/hosts and make up whatever
> > hosts you want.
> > For other users? Actually setup the hostnames you need to all point to
> > the same IP.
> >
> OK this I've experimented with.
> If I edit the /etc/hosts file I can add any number of names and they
> all resolve
> to localhost (or the machine but they all resolve to the same place).
> When I change
> the hostname - - - - the FQDN - - - - well I don't see how there is
> more than one
> option for that. So when an application complains that there isn't an
> 'appropriate'
> FQDN (or whatever the actual wording in the complaint was) then the hostname
> or FQDN was 'not' set.
>
> So I can set up /etc/hosts like:
> 192.168.1.2 white
> 192.168.1.2 yellow
> 192.168.1.2 green
> 192.168.1.2 red
> and I have different hosts. But my FQDN is still 'pink' well that
> doesn't seem to work.
>
> So what could I do to resolve this issue?
>
> I cannot use 192.168.1.2 for my FQDN.
> I do not know how to have more than one FQDN.
>
> Do I change my machines FQDN to pink.com and then use the other hosts
> in /etc/hosts?
>
You can make up FQDN's in /etc/hosts the same way and they'll also
resolve for your clients and be matchable by name-based virtual hosts.
The machines notion of its own single FQDN is not relevant to 99% of
httpd configurations. It's only relevant if you omit the ServerName
directive and the server has to guess.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
On Tue, Jan 28, 2020 at 7:21 AM Eric Covener <co...@gmail.com> wrote:
>
> > So I'm coming back to my previous question - - - - how do I set up different
> > FQDNs (hostnames) on 'one' machine?
>
> On your client you test from? Edit /etc/hosts and make up whatever
> hosts you want.
> For other users? Actually setup the hostnames you need to all point to
> the same IP.
>
OK this I've experimented with.
If I edit the /etc/hosts file I can add any number of names and they
all resolve
to localhost (or the machine but they all resolve to the same place).
When I change
the hostname - - - - the FQDN - - - - well I don't see how there is
more than one
option for that. So when an application complains that there isn't an
'appropriate'
FQDN (or whatever the actual wording in the complaint was) then the hostname
or FQDN was 'not' set.
So I can set up /etc/hosts like:
192.168.1.2 white
192.168.1.2 yellow
192.168.1.2 green
192.168.1.2 red
and I have different hosts. But my FQDN is still 'pink' well that
doesn't seem to work.
So what could I do to resolve this issue?
I cannot use 192.168.1.2 for my FQDN.
I do not know how to have more than one FQDN.
Do I change my machines FQDN to pink.com and then use the other hosts
in /etc/hosts?
Other options?
TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by Eric Covener <co...@gmail.com>.
> So I'm coming back to my previous question - - - - how do I set up different
> FQDNs (hostnames) on 'one' machine?
On your client you test from? Edit /etc/hosts and make up whatever
hosts you want.
For other users? Actually setup the hostnames you need to all point to
the same IP.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
On Mon, Jan 27, 2020 at 8:27 PM Richard
<li...@listmail.innovate.net> wrote:
>
>
>
> > Date: Monday, January 27, 2020 16:51:44 -0600
> > From: o1bigtenor <o1...@gmail.com>
> >
> > On Mon, Jan 27, 2020 at 4:17 PM Richard wrote:
> >>
> >> > Date: Monday, January 27, 2020 09:42:51 -0600
> >> > From: o1bigtenor <o1...@gmail.com>
> >> >
> >> > So I don't really need to use 'virtual hosts'. What I am actually
> >> > needing to do is to use different ports to the same 'stack'
> >> > rather than creating different 'stacks'.
> >> >
> >> > By this I mean that I don't need to use different server
> >> > configurations for each application rather than I need to 'just'
> >> > assign different ports to the different applications and this
> >> > should work.
> >>
> >> I think you may be confusing "virtual machines" and "(apache)
> >> virtual hosts". A virtual machine (VM) is indeed a whole "stack"
> >> (as you are referring to things). A[n apache] virtual host
> >> environment is simply configuring an instance of apache to serve
> >> content (more or less) as if it's on different VMs. This will
> >> allow you to use different document roots for each content set as
> >> well as serve out on different ports and/or hostnames from a
> >> single machine.
> >>
> >> In general I try to avoid serving content on non-standard
> >> http/https ports as it tends to be confusing to users. Using
> >> different hostnames and/or IPnumbers is cleaner and causes fewer
> >> headaches.
> >>
> > It may have not been clear but I was asking as to whether I should
> > be using virtual hosts or something else (maybe different port
> > numbers).
> >
> > Different hostnames - - - - how do I have that on one physical
> > machine?
> >
> > Are you recommending using subdomains? (I think that's what its
> > called!?!)
> >
>
> If you're trying to serve your content via http, which appears to be
> your goal, then to serve it out on different ports - without using
> the apache virtual host configuration - you'd need to have multiple
> instances of apache running. That's possible, but very ugly.
OK - - - - Mr Richard suggests that I use different ports but further offers
that using different hostnames offers a 'cleaner' solution. If I'm
understanding
this all correctly meaning using vhosts and multiple hostnames.
You're suggesting just use different ports.
>
> You may want to read the apache virtual host documentation:
>
> <https://httpd.apache.org/docs/2.4/vhosts/>
I had read that page quite a few times before - - - in the tradition of
excellent LInux documentation that page is a wonderful example. All
information needful to a skilled practitioner is included but for one who
isn't highly skilled there are little to no examples and definitely no
context. That means that one who is working through things for a first
time - - - - - well the information isn't terribly helpful.
>
> Any number of hostnames (unique or sub-domains) can resolve to the
> same ipnumber, the responding software simply needs to know how to
> handle things, assuming that different responses are necessary. Look
> at the "name-based virtual host" information in the vhosts
> documentation. [A machine can also have multiple ipnumbers assigned
> to it.]
>
I understand that multiple ips can be assigned to a machine - - - - my server,
but not my server test box, actually has 4 nics available.
So I'm coming back to my previous question - - - - how do I set up different
FQDNs (hostnames) on 'one' machine?
Please? TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by Richard <li...@listmail.innovate.net>.
> Date: Monday, January 27, 2020 16:51:44 -0600
> From: o1bigtenor <o1...@gmail.com>
>
> On Mon, Jan 27, 2020 at 4:17 PM Richard wrote:
>>
>> > Date: Monday, January 27, 2020 09:42:51 -0600
>> > From: o1bigtenor <o1...@gmail.com>
>> >
>> > So I don't really need to use 'virtual hosts'. What I am actually
>> > needing to do is to use different ports to the same 'stack'
>> > rather than creating different 'stacks'.
>> >
>> > By this I mean that I don't need to use different server
>> > configurations for each application rather than I need to 'just'
>> > assign different ports to the different applications and this
>> > should work.
>>
>> I think you may be confusing "virtual machines" and "(apache)
>> virtual hosts". A virtual machine (VM) is indeed a whole "stack"
>> (as you are referring to things). A[n apache] virtual host
>> environment is simply configuring an instance of apache to serve
>> content (more or less) as if it's on different VMs. This will
>> allow you to use different document roots for each content set as
>> well as serve out on different ports and/or hostnames from a
>> single machine.
>>
>> In general I try to avoid serving content on non-standard
>> http/https ports as it tends to be confusing to users. Using
>> different hostnames and/or IPnumbers is cleaner and causes fewer
>> headaches.
>>
> It may have not been clear but I was asking as to whether I should
> be using virtual hosts or something else (maybe different port
> numbers).
>
> Different hostnames - - - - how do I have that on one physical
> machine?
>
> Are you recommending using subdomains? (I think that's what its
> called!?!)
>
If you're trying to serve your content via http, which appears to be
your goal, then to serve it out on different ports - without using
the apache virtual host configuration - you'd need to have multiple
instances of apache running. That's possible, but very ugly.
You may want to read the apache virtual host documentation:
<https://httpd.apache.org/docs/2.4/vhosts/>
Any number of hostnames (unique or sub-domains) can resolve to the
same ipnumber, the responding software simply needs to know how to
handle things, assuming that different responses are necessary. Look
at the "name-based virtual host" information in the vhosts
documentation. [A machine can also have multiple ipnumbers assigned
to it.]
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
On Mon, Jan 27, 2020 at 4:17 PM Richard
<li...@listmail.innovate.net> wrote:
>
>
>
> > Date: Monday, January 27, 2020 09:42:51 -0600
> > From: o1bigtenor <o1...@gmail.com>
> >
> > So I don't really need to use 'virtual hosts'. What I am actually
> > needing to do is to use different ports to the same 'stack' rather
> > than creating different 'stacks'.
> >
> > By this I mean that I don't need to use different server
> > configurations for each application rather than I need to 'just'
> > assign different ports to the different applications and this
> > should work.
>
> I think you may be confusing "virtual machines" and "(apache) virtual
> hosts". A virtual machine (VM) is indeed a whole "stack" (as you are
> referring to things). A[n apache] virtual host environment is simply
> configuring an instance of apache to serve content (more or less) as
> if it's on different VMs. This will allow you to use different
> document roots for each content set as well as serve out on different
> ports and/or hostnames from a single machine.
>
> In general I try to avoid serving content on non-standard http/https
> ports as it tends to be confusing to users. Using different hostnames
> and/or IPnumbers is cleaner and causes fewer headaches.
>
It may have not been clear but I was asking as to whether I should be
using virtual hosts or something else (maybe different port numbers).
Different hostnames - - - - how do I have that on one physical machine?
Are you recommending using subdomains? (I think that's what its called!?!)
TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by Richard <li...@listmail.innovate.net>.
> Date: Monday, January 27, 2020 09:42:51 -0600
> From: o1bigtenor <o1...@gmail.com>
>
> So I don't really need to use 'virtual hosts'. What I am actually
> needing to do is to use different ports to the same 'stack' rather
> than creating different 'stacks'.
>
> By this I mean that I don't need to use different server
> configurations for each application rather than I need to 'just'
> assign different ports to the different applications and this
> should work.
I think you may be confusing "virtual machines" and "(apache) virtual
hosts". A virtual machine (VM) is indeed a whole "stack" (as you are
referring to things). A[n apache] virtual host environment is simply
configuring an instance of apache to serve content (more or less) as
if it's on different VMs. This will allow you to use different
document roots for each content set as well as serve out on different
ports and/or hostnames from a single machine.
In general I try to avoid serving content on non-standard http/https
ports as it tends to be confusing to users. Using different hostnames
and/or IPnumbers is cleaner and causes fewer headaches.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
On Mon, Jan 27, 2020 at 6:33 AM Eric Covener <co...@gmail.com> wrote:
>
> On Mon, Jan 27, 2020 at 7:30 AM o1bigtenor <o1...@gmail.com> wrote:
> >
> > Thank you for responding!!!
> >
> > On Mon, Jan 27, 2020 at 6:23 AM Eric Covener <co...@gmail.com> wrote:
> > >
> > > > Perhaps I'm not understanding either the concept of virtual hosting or how
> > > > to run multiple programs on one host very well. If so - - - if someone would
> > > > please advise?
> > >
> > > It is possible that two "applications" insist on a fixed or even
> > > separate DocumenRoot, but it's just as likely that each one would be
> > > just as happy to have their files found by an Alias or AliasMatch.
> >
> > I do not understand what you mean by this - - - - could you perhaps
> > point me to where I might see how this is set up or used (or or or)
> > so that I might understand what you mean. (I think I understand the words
> > but I don't understand how to 'do it'.
>
> The DocumentRoot can be viewed as just the default place URLs are
> mapped to the filesystem. There's only 1 per virtual host.
> To use different virtual hosts, you need separate IP addresses,
> hostnames, or ports.
>
> If you want URL-path X to lead to filesystem path Y on disk, you can
> use the Alias or AliasMatch directive to customize it without using
> additional IP addresses/hostnames/ports to differentiate.
>
> But of course this doesn't help if you have two application that
> expect to live on /
OK - - - I think I understand this (my following question(s) may prove
otherwise!).
Both applications are not expecting to live on / but to me the installation
instructions for each are incompatible.
So - - - - step by step to make sure I'm not fubaring things too many more
times (I'm at 5 times installing the lamp stack trying to get things working).
Of course if I knew what I was doing that wouldn't likely be necessary but
one trades time for experience (at least in my case). As my other question,
email subject: question re: where to place, shades into this one so I'm
going to combine the somewhat different requests into one - - this one
(hopefully allowed and should be traceable).
So I don't really need to use 'virtual hosts'. What I am actually needing to do
is to use different ports to the same 'stack' rather than creating
different 'stacks'.
By this I mean that I don't need to use different server configurations for
each application rather than I need to 'just' assign different ports to the
different applications and this should work.
Where my problem lies is in the request that application a expects to be
called from: DocumentRoot /var/www/applicationa/web and the second wants
to be called from: DocumentRoot /var/www/example.com .
I don't understand how to setup both in the way asked for by the script I'm
following for each as I don't understand how to modify, what to modify or even
where to modify something to allow both applications to co-exist.
Have tried reading the documentation and it can usually follow what is being
said by the examples only show exactly what is being referred to without ever
showing any context. So I don't understand where that specific whatever
belongs and how it relates to the whole. Understand that you are likely not
responsible for the docs but even though they are clear and concise without
an example which places the specific into its larger setting - - -
-well I don't know
what to do with the specific and then I mus needs ask here. Perhaps an
example configuration could be referred to in the docs so that one could see
these details.
Thanking you for your assistance muchly!!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by Eric Covener <co...@gmail.com>.
On Mon, Jan 27, 2020 at 7:30 AM o1bigtenor <o1...@gmail.com> wrote:
>
> Thank you for responding!!!
>
> On Mon, Jan 27, 2020 at 6:23 AM Eric Covener <co...@gmail.com> wrote:
> >
> > > Perhaps I'm not understanding either the concept of virtual hosting or how
> > > to run multiple programs on one host very well. If so - - - if someone would
> > > please advise?
> >
> > It is possible that two "applications" insist on a fixed or even
> > separate DocumenRoot, but it's just as likely that each one would be
> > just as happy to have their files found by an Alias or AliasMatch.
>
> I do not understand what you mean by this - - - - could you perhaps
> point me to where I might see how this is set up or used (or or or)
> so that I might understand what you mean. (I think I understand the words
> but I don't understand how to 'do it'.
The DocumentRoot can be viewed as just the default place URLs are
mapped to the filesystem. There's only 1 per virtual host.
To use different virtual hosts, you need separate IP addresses,
hostnames, or ports.
If you want URL-path X to lead to filesystem path Y on disk, you can
use the Alias or AliasMatch directive to customize it without using
additional IP addresses/hostnames/ports to differentiate.
But of course this doesn't help if you have two application that
expect to live on /
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
Thank you for responding!!!
On Mon, Jan 27, 2020 at 6:23 AM Eric Covener <co...@gmail.com> wrote:
>
> > Perhaps I'm not understanding either the concept of virtual hosting or how
> > to run multiple programs on one host very well. If so - - - if someone would
> > please advise?
>
> It is possible that two "applications" insist on a fixed or even
> separate DocumenRoot, but it's just as likely that each one would be
> just as happy to have their files found by an Alias or AliasMatch.
I do not understand what you mean by this - - - - could you perhaps
point me to where I might see how this is set up or used (or or or)
so that I might understand what you mean. (I think I understand the words
but I don't understand how to 'do it'.
>
> The bigger the SW, the harder it might be to get it to respond
> correctly if you try to shoe-horn it into running out of some
> alternate URL path / context root.
>
As I found - - - and what caused the ask.
Thanks for the suggestion!!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Configuration question
Posted by Eric Covener <co...@gmail.com>.
> Perhaps I'm not understanding either the concept of virtual hosting or how
> to run multiple programs on one host very well. If so - - - if someone would
> please advise?
It is possible that two "applications" insist on a fixed or even
separate DocumenRoot, but it's just as likely that each one would be
just as happy to have their files found by an Alias or AliasMatch.
The bigger the SW, the harder it might be to get it to respond
correctly if you try to shoe-horn it into running out of some
alternate URL path / context root.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: Configuration question
Posted by o1bigtenor <o1...@gmail.com>.
On Fri, Jan 24, 2020 at 7:58 PM o1bigtenor <o1...@gmail.com> wrote:
>
> Greetings
>
> Am a noob at server setup installation and configuration.
>
> Running on a Debian 10 Buster box set up as a LAMP stack using versions
> 1. Debian 10 (Buster)
> 2. Apache 2.4.38
> 3. Mariadb 10.3
> 4. PHP 7.3.11
>
> Being a noob I've been using documents to guide me in the setup and
> the configuration of my stack. History has shown me that I'm quite
> good at finding some kind of weird way of really confusing things so
> all this work is being done on a test system - - - meaning that if
> things get bad enough I would just blow the whole system and
> everything away and start over but even struggling through all the
> 'joys' of figuring out the arcanities of how and what - - - - well
> that's part of the learning process.
>
> So my first server software install I did to 'localhost' (this is
> after all experimental but with the possibility of use after
> successful installation/configuration/etc). All software to be served
> is for in-house use only. This is not meant to be a server for use
> from the outside world This first software wants to be accessed from
> the browser as localhost/xxxx. This means that
> /etc/apache2/sites-available/000-default.conf reads (one line
> anyway): DocumentRoot /var/www/html. The problem is that the second
> program wants DocumentRoot /var/www/html commented out and
> DocumentRoot /var/www/yyyyy/web put in its place.
>
> I would assume that would mean that apache would no longer be serving
> program xxxx the way it wants to be.
>
> Is there a way of resolving this impass?
> I'm not at all skilled enough to plan out something that would work.
> Maybe I need to change the settings for both programs.
>
> Suggestions, please?
>
With a couple more hours of looking I found a possible answer - - - sorry
wasn't in any docs but rather in the methods suggested by others for install.
What I found was the concept of virtual hosts.
I am not sure if this is a great way to do things but that will be
what I'm going
to try. I would rather handle every specific program as being hosted on the
same instance but perhaps treating each program (that needs a server for its
implementation) as an independent host works better. Logically it is a shift
for me but I can see how it could assist in security, maybe.
Perhaps I'm not understanding either the concept of virtual hosting or how
to run multiple programs on one host very well. If so - - - if someone would
please advise?
TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org