Re: [users@httpd] Variable of document root path based on source ip
A blunt approach could also leverage mod_rewrite, but I would test Yann's suggestion. You can rewrite the path to the filesystem provided that the RewriteRule is in the vhost context. On Tue, 3 May 2022 at 12:57, Ivan Ionut wrote: > No, I have clients that from wan too. Basically when I make some important > changes to a site...all clients from wan to view the under_construction > directory. > > > > On 03-05-2022 16:03, Frank Gingras wrote: > > Do all clients come from the 192.168.1.0/24 range? > > On Tue, 3 May 2022 at 04:23, Ivan Ionut wrote: > > I did not understand... I have to define two vhosts configs for mysite.com > with two separate document root in each config? > > > PS: i have one static ip for mysite.com > > On 03-05-2022 00:32, Frank Gingras wrote: > > The simple approach here would be to define separate IP:80 vhosts and set > a separate document root in each vhost. > > On Mon, 2 May 2022 at 06:48, Eric Covener wrote: > > You cannot use Define conditionally this way. It is parsed at startup and > ignores any enclosing directives > > On Mon, May 2, 2022, 2:24 AM Ivan Ionut wrote: > > I'm trying to set a virtual host on apache2 with this configuration. > > > ServerName mysite.com > ServerAlias www.mysite.com > > > Define directory_path /srv/http/mysite > > > Define directory_path /srv/http/under_construction > > > DocumentRoot ${directory_path} > > > Require all granted > > > > The problem is that the If directive does not match when I access it from > that lan. > > I'm using Apache/2.4.18. > -- > > *Ivan Ionuț* > > *Str. Săliște 20, Galati 800023* > > *Tel/Fax: +40236 493277 * > > *Email: ivan.io...@tehnopol-gl.ro * > > > > > *The content of this email is confidential and intended for the recipient > specified in message only. It is strictly forbidden to share any part of > this message with any third party, without a written consent of the > sender. If you are not the intended recipient of this message, please > notify the sender immediately, and delete the message and any attachments. > Any disclosure, reproduction, distribution or other use of this message or > any attachments by an individual or entity other than the intended > recipient is prohibited.* > > > >
Re: [users@httpd] Variable of document root path based on source ip
No, I have clients that from wan too. Basically when I make some important changes to a site...all clients from wan to view the under_construction directory. On 03-05-2022 16:03, Frank Gingras wrote: Do all clients come from the 192.168.1.0/24 [1] range? On Tue, 3 May 2022 at 04:23, Ivan Ionut wrote: I did not understand... I have to define two vhosts configs for mysite.com [2] with two separate document root in each config? PS: i have one static ip for mysite.com [2] On 03-05-2022 00:32, Frank Gingras wrote: The simple approach here would be to define separate IP:80 vhosts and set a separate document root in each vhost. On Mon, 2 May 2022 at 06:48, Eric Covener wrote: You cannot use Define conditionally this way. It is parsed at startup and ignores any enclosing directives On Mon, May 2, 2022, 2:24 AM Ivan Ionut wrote: I'm trying to set a virtual host on apache2 with this configuration. ServerName mysite.com [2] ServerAlias www.mysite.com [3] Define directory_path /srv/http/mysite Define directory_path /srv/http/under_construction DocumentRoot ${directory_path} Require all granted The problem is that the If directive does not match when I access it from that lan. I'm using Apache/2.4.18. [4] -- Ivan Ionuț Str. Săliște 20, Galati 800023 Tel/Fax: +40236 493277 Email: ivan.io...@tehnopol-gl.ro _The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to share any part of this message with any third party, without a written consent of the sender. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited._ Links: -- [1] http://192.168.1.0/24 [2] http://mysite.com [3] http://www.mysite.com [4] http://2.4.18.
Re: [users@httpd] Linking website pages with Apache on LocalHost
On 4/27/22 12:25, DiversityLink/Milt Spain wrote: > I have gotten Apache2.4 installed and running on my local computer. It’s > on the C drive and the website is at C:/Apache24/htdocs/Milt.com. > > The Milt.com folder contains Index (htm file) and Page1 (html file). > > 127.0.0.1/Milt.com displays the Index. > > Now I want a hyperlink on the Index page that will bring up Page1. I > have been unable to make anything work. Is Page1 in the wrong place or > could I be using the wrong path in the hyperlink (I’ve tried several > without success)? > > All assistance will be appreciated. > > Milt Spain I can't make heads or tails as to what your requestion? Did you ty to make an index.html file with html? -- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and extermination camps, but incompatible with living as a free human being. -RI Safir 2013 - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Variable of document root path based on source ip
On Tue, May 3, 2022 at 5:44 PM Yann Ylavic wrote: > > On Mon, May 2, 2022 at 8:24 AM Ivan Ionut wrote: > > > > I'm trying to set a virtual host on apache2 with this configuration. > > > > > > ServerName mysite.com > > ServerAlias www.mysite.com > > > > > > Define directory_path /srv/http/mysite > > > > > > Define directory_path /srv/http/under_construction > > > > > > DocumentRoot ${directory_path} > > > > > > Require all granted > > > > > > > > The problem is that the If directive does not match when I access it from > > that lan. > > Possibly something like this could work: > > Define directory_path_mysite "/srv/http/mysite" > Define directory_path_under_construction "/srv/http/under_construction" > > > DocumentRoot "${directory_path_mysite}" > > DocumentRoot "$(directory_path_under_construction}" > But DocumentRoot might not be allowed in an > Require all granted > > > Require all granted > > > > Both DocumentRoots would be initialized at startup (when Defines are > evaluated, the DocumentRoot used at runtime will be determined based on the still. > > > Regards; > Yann. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Variable of document root path based on source ip
On Mon, May 2, 2022 at 8:24 AM Ivan Ionut wrote: > > I'm trying to set a virtual host on apache2 with this configuration. > > > ServerName mysite.com > ServerAlias www.mysite.com > > > Define directory_path /srv/http/mysite > > > Define directory_path /srv/http/under_construction > > > DocumentRoot ${directory_path} > > > Require all granted > > > > The problem is that the If directive does not match when I access it from > that lan. Possibly something like this could work: Define directory_path_mysite "/srv/http/mysite" Define directory_path_under_construction "/srv/http/under_construction" DocumentRoot "${directory_path_mysite}" DocumentRoot "$(directory_path_under_construction}" Require all granted Require all granted Both DocumentRoots would be initialized at startup (when Defines are evaluated, the
Re: [users@httpd] Variable of document root path based on source ip
Do all clients come from the 192.168.1.0/24 range? On Tue, 3 May 2022 at 04:23, Ivan Ionut wrote: > I did not understand... I have to define two vhosts configs for mysite.com > with two separate document root in each config? > > > PS: i have one static ip for mysite.com > > On 03-05-2022 00:32, Frank Gingras wrote: > > The simple approach here would be to define separate IP:80 vhosts and set > a separate document root in each vhost. > > On Mon, 2 May 2022 at 06:48, Eric Covener wrote: > > You cannot use Define conditionally this way. It is parsed at startup and > ignores any enclosing directives > > On Mon, May 2, 2022, 2:24 AM Ivan Ionut wrote: > > I'm trying to set a virtual host on apache2 with this configuration. > > > ServerName mysite.com > ServerAlias www.mysite.com > > > Define directory_path /srv/http/mysite > > > Define directory_path /srv/http/under_construction > > > DocumentRoot ${directory_path} > > > Require all granted > > > > The problem is that the If directive does not match when I access it from > that lan. > > I'm using Apache/2.4.18. > -- > > *Ivan Ionuț* > > *Str. Săliște 20, Galati 800023* > > *Tel/Fax: +40236 493277 * > > *Email: ivan.io...@tehnopol-gl.ro * > > > > > *The content of this email is confidential and intended for the recipient > specified in message only. It is strictly forbidden to share any part of > this message with any third party, without a written consent of the > sender. If you are not the intended recipient of this message, please > notify the sender immediately, and delete the message and any attachments. > Any disclosure, reproduction, distribution or other use of this message or > any attachments by an individual or entity other than the intended > recipient is prohibited.* > > > >
[users@httpd] REMINDER - Travel Assistance available for ApacheCon NA New Orleans 2022
Hi All Contributors and Committers, This is a first reminder email that travel assistance applications for ApacheCon NA 2022 are now open! We will be supporting ApacheCon North America in New Orleans, Louisiana, on October 3rd through 6th, 2022. TAC exists to help those that would like to attend ApacheCon events, but are unable to do so for financial reasons. This year, We are supporting both committers and non-committers involved with projects at the Apache Software Foundation, or open source projects in general. For more info on this year's applications and qualifying criteria, please visit the TAC website at http://www.apache.org/travel/ Applications are open and will close on the 1st of July 2022. Important: Applicants have until the closing date above to submit their applications (which should contain as much supporting material as required to efficiently and accurately process their request), this will enable TAC to announce successful awards shortly afterwards. As usual, TAC expects to deal with a range of applications from a diverse range of backgrounds. We therefore encourage (as always) anyone thinking about sending in an application to do so ASAP. Why should you attend as a TAC recipient? We encourage you to read stories from past recipients at https://apache.org/travel/stories/ . Also note that previous TAC recipients have gone on to become Committers, PMC Members, ASF Members, Directors of the ASF Board and Infrastructure Staff members. Others have gone from Committer to full time Open Source Developers! How far can you go! - Let TAC help get you there.
Re: [users@httpd] Variable of document root path based on source ip
I did not understand... I have to define two vhosts configs for mysite.com with two separate document root in each config? PS: i have one static ip for mysite.com [1] On 03-05-2022 00:32, Frank Gingras wrote: The simple approach here would be to define separate IP:80 vhosts and set a separate document root in each vhost. On Mon, 2 May 2022 at 06:48, Eric Covener wrote: You cannot use Define conditionally this way. It is parsed at startup and ignores any enclosing directives On Mon, May 2, 2022, 2:24 AM Ivan Ionut wrote: I'm trying to set a virtual host on apache2 with this configuration. ServerName mysite.com [1] ServerAlias www.mysite.com [2] Define directory_path /srv/http/mysite Define directory_path /srv/http/under_construction DocumentRoot ${directory_path} Require all granted The problem is that the If directive does not match when I access it from that lan. I'm using Apache/2.4.18. [4] -- Ivan Ionuț Str. Săliște 20, Galati 800023 Tel/Fax: +40236 493277 Email: ivan.io...@tehnopol-gl.ro _The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to share any part of this message with any third party, without a written consent of the sender. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited._ Links: -- [1] http://mysite.com [2] http://www.mysite.com [3] http://192.168.1.0/24 [4] http://2.4.18.