How To Tell weblogic To Not Log Certain Requests In Its Access Log? - weblogic

I have all the requests going to access.log in weblogic server, I need to stop logging few request patterns. Is there any possibility ?
I already customized the access loggers with CustomELFLogger and seems to be there is no option to stop the logs not to go to access.log file.
Any other thoughts ?

There is no feature to filter the particular requests but a workaround would be , implement the customelflogger and replace cs-uri filed with custom class.
In the custom class, just put a condition for the specific requests that needs to be filtered and leave the rest.
It is working as expected.

Related

How to get log unique requests and check their status in Lucee

I am trying to log specific requests by users to determine if their Lucee request has completed, if it is still running, etc. The purpose of this is to fire of automated processes on demand and ensure to the end users that the processes is already started so they do not fire off a second process. I have found the HTTP_X_REQUEST_ID in other searches, but when dumping the CGI variables, it is not listed. I have set CGI variables to Writable rather than Read Only, but it is still not showing up. Is it something I must add in IIS, or a setting in Lucee Admin that I am overlooking. Is there a different way to go about doing this rather than HTTP_X_REQUEST_ID? Any help is appreciated.
Have yo consider using <cfflush>. When Lucee request start you can send partial information to the client informing that the process has started in the server.

How to safely allow PUT for single program in Apache 2.4

I am using Magento (version 2.2.5) and I seem to need to allow PUT requests for my server (at least for the Magento program).
For specifics, on Magento entering a discount code does not work on the checkout page fails "501 (Not Implemented)". However the discount code section does work in the shopping cart page. The difference seems to be that the shopping cart page uses GET method while the checkout page uses PUT method.
How do I enable PUT method to work for Magento? Is this something which can be done through .htaccess? If it needs to be done for the entire server, is there any security risk to allow PUT requests?
I have seen somewhere that this might be related to Apache's "mod_security". I am new at this and I do not want to expose the server to any potential vulnerabilities.
Thank you in advance.
Apache allows PUT by default, but there are many different way to prohibit said method. ModSecurity (via custom rules or the Core Rule Set) is one of them. However, status code 501 is not used by ModSecurity by default. It can be customized though, but I doubt it.
Under the line, I do not think you can solve this mystery without access to the error-log of the server or communicating with somebody who has access.

Configure Access-Control-Allow-Origin for monit

I am trying to grab json data from monit and display it on a status page for management to see the current status of a handful of processes. This info would be displayed in Confluence running on the same machine but since Confluence (apache) and monit are running on different ports it is considered to be cross domain.
I know I can write a server side process to serve this data but that seems to be overkill and would actually take longer that it took to set monit up in the first place :)
The simplest solution is to configure monit's headers (Access-Control-Allow-Origin) to allow the other server. Does anyone know how to do this? I suspect there is a way since M/Monit would run into the same issue. I have tried some blind attempts on the "httpd... allow" lines but it complains about the syntax with x.x.x.x:port or using keyword "port" in that location.
ok... going to answer my own question (sort of).
First, I think I may have asked the question wrong. I don't deal with a lot of cross domain issues. Sorry about that.
But here is what I did to get to the monit info from the other servers: pretty simple using proxies in apache where the main server is:
ProxyPass /monit http://localhost:2812
ProxyPassReverse /monit http://mainserver/monit
ProxyPass /monit2 http://server2:2812
ProxyPassReverse /monit2 http://mainserver/monit2
I did this for each of the servers and tested that I can get to either the monit web interface or to the _status?format=json sub pages. I can now call them using ajax on our main web page.
This also has the benefit that I can lock down the monit access control to just the main server but have the info show on a more visible page. :)
I don't think you would need a proxy to just display monit's api or http info. It depends on how you have your network and dns configured. If you'd like to use only localhost, then that might be necessary. But, monit does have a facility to use global host ip access using allow directives in it's own config rc file

Apache mod_proxy write Post to log file

Is there any way to capture post request and write it to log running apache mod_proxy (or any other mod)?
For example, I have one CMS behind apache mod_proxy and I want to capture Login textbox which uses POST verb in the apache log file, it is possible?
Thanks :).
Please take a look at mod_dumpio. All input and/or all output will be logged into error.log.
mod_security can log post data too, but a little complex.
This may suit to your needs mod_log_post (striped down version of mod_sec), but has less documentation and support. Though it might work within your purpose.

Apache HTTP Filter/Logging

I am using IBM HTTP Server 6.1 / Apache 2.0.47. I would like to pull a specific piece of data out of all requests coming through the HTTP server and if it exists log the found data along with the target URL. It needs to be as efficient as possible.
Is a filter appropriate or a handler?
Does a filter/handler exist that I can configure and use as is or do I need to write something? How do I configure, or write this?
Thanks.
You could use mod_security apache module , which have a good audit log tool SecAuditLog (log all headers), that you can declench by http status. You'll find as well fine filters, that will maybe fits your needs.
And do not hesitate to ask servfault gurus on that.