[users@httpd] force secondary authentication for one Proxy URL QUERY_STRING

2020-06-11 Thread Jason Keltz

Hi.

I am using a Tomcat application that is proxied through an Apache httpd 
server using ProxyPass/ProxyReverse. That part is working perfectly.


The application allows all users to use a particular function which I 
would like to limit to only specific users. The URL that I would like to 
limit looks like this:


https://example.com/#/?key=KJKJHjkdflkjsdflkjJhdsfjhf

If I add to my VirtualHost:


  
  Require valid-user


... then, of course, the user has to authenticate immediately even when 
visiting just https://example.com


I want to only apply authentication when the QUERY_STRING includes "?key".

I know I can't evaluate the QUERY_STRING in the  section. 
However, I should be able to add an IF expression for that exact purpose:



  
    
    Require valid-user
  


This does not work either. I don't get any debugging so I don't know why 
it doesn't work.


Any help would be appreciated.

Thanks!



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



Re: [users@httpd] How to permanently disable default config files

2020-06-11 Thread Frank



On 10/06/20 05:29 PM, Scott A. Wozny wrote:
> Running the Centos7 packaged httpd, I didn't want the config files in
> /etc/httpd/conf.d (autoindex.conf, userdir.conf and welcome.conf) to
> load.  I thought I was being clever and renamed them all to name.disable
> so they there there for my reference, but wouldn't load the modules and
> settings. 
> 
> Then I did a yum update to httpd.  The disable files were still there,
> but the installer replaced the "missing" .conf file which kept my
> instance from loading (I have disabled modules necessary for some of the
> config lines in these conf files).
> 
> Is there a "standard" way to remove files so a yum update install
> doesn't replace them?  I have "comment out all the lines in the conf
> files and leave them in place" as a fallback, but I was wondering if I'm
> missing the "correct" way to do this.  I can't imagine I'm the only
> person who doesn't want those files to load on a default install.
> 
> Thanks for any suggestions you may have,
> 
> Scott

That would be a question for the maintainers of that package, ideally.
Check the CentOS mailing list and/or IRC channel on freenode.



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



Re: [users@httpd] How to permanently disable default config files

2020-06-11 Thread Yehuda Katz
You can use yum-plugin-post-transaction-actions to delete the files (not
currently available in CentOS 8 though):
Create a file named /etc/yum/post-actions/httpd.action
With the content:
httpd*:update:rm -f /etc/httpd/conf.d/file_to_delete

You should also be able to leave the files empty instead of deleting them -
yum should leave the modified files alone.

- Y

Sent from a device with a very small keyboard and hyperactive autocorrect.

On Wed, Jun 10, 2020, 5:29 PM Scott A. Wozny  wrote:

> Running the Centos7 packaged httpd, I didn't want the config files in
> /etc/httpd/conf.d (autoindex.conf, userdir.conf and welcome.conf) to load.
> I thought I was being clever and renamed them all to name.disable so they
> there there for my reference, but wouldn't load the modules and settings.
>
> Then I did a yum update to httpd.  The disable files were still there, but
> the installer replaced the "missing" .conf file which kept my instance from
> loading (I have disabled modules necessary for some of the config lines in
> these conf files).
>
> Is there a "standard" way to remove files so a yum update install doesn't
> replace them?  I have "comment out all the lines in the conf files and
> leave them in place" as a fallback, but I was wondering if I'm missing the
> "correct" way to do this.  I can't imagine I'm the only person who doesn't
> want those files to load on a default install.
>
> Thanks for any suggestions you may have,
>
> Scott
>


[users@httpd] Proxy pass settings

2020-06-11 Thread Niranjan Rao

Greetings,


I have spent two days trying various settings and googling for solution 
for last two days, of course no luck yet.



I want to expose two servers using proxy pass. I have done some proxy 
pass settings earlier and in those cases it worked smoothly. For the 
purpose of discussion remote server is tomcat, but should not matter as 
proxy pass is using http url.



I have same set of applications and trying to expose it from some 
server. Example could be



https://myserver/uat/app1

https://myserver/qa/app1


Earlier I have tried just https://myserver/app1 and it works correctly. 
But now I want to add environment to it. Applications don't know they 
are proxied and when "app1/" is accessed it sends back to "/app1/login", 
relative to app1. This information gets lost in translated as I want it 
to go to "/uat/app1". Same issue applies to any of the links web page 
tries to load - it's relative to app1.



I can do server config changes on tomcat side or apache side. Without 
doing any massive code surgery, is it possible to achieve what I want to 
do? Rewrite/change all links coming from "/app1/abc" to "/uat/app1/abc" 
or "/qa/app1/abc" depending upon the root?



Since it's same application, all urls are same, except the environment 
context.



Thanks,


Niranjan


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