• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Logging POST data not working

gennolo

Basic Pleskian
I am using Plesk Obsidian on a Centos 7 VPS.

I occasionally have the need to log POST data in received in web requests.

I tried following this guide which says to use "mod_dumpio" (which is already active in Plesk in the server's Apache modules).

I then inserted :

Code:
DumpIOInput On
DumpIOOutput On
LogLevel dumpio:trace7

in the "Apache additional directives" for my domain both for HTTP / HTTPS,
then I restarted httpd and sent a POST request to the server, but nothing appears in the logs for the involved domain.

Am I doing something wrong?
 
Hi,

I'm trying to log POST HTTP requests data too. Proxy mode is enabled, so only Nginx is used.

I have found that the needed configuration at Nginx.conf is :

log_format post_logs '[$time_local] "$request" $status '
'$body_bytes_sent "$http_referer" '
'"$http_user_agent" [$request_body]';

access_log /var/log/nginx/access.log post_logs;


But I'm getting the following error at Plesk "Apache & nginx Setting" of my Webspace :

Invalid nginx configuration: nginx: [emerg] "log_format" directive is not allowed here in /var/www/vhosts/system/applicarte.abidjan.net/conf/vhost_nginx.conf:153 nginx: configuration file /etc/nginx/nginx.conf test failed

Can any one help to log POST DATA for a subscription at plesk?

Thank you
 
Yeah, it's just not allowed in the A + N settings. You can edit the nginx configuration files directly. It'll be overwritten, but this should only be a temporary change anyways. It should be in /var/www/vhosts/system/<domain>/conf
 
Yeah, it's just not allowed in the A + N settings. You can edit the nginx configuration files directly. It'll be overwritten, but this should only be a temporary change anyways. It should be in /var/www/vhosts/system/<domain>/conf
Thank you for your help! I was looking for the link /var/www/vhosts/system/<domain>/conf/nginx.conf. I could log the body of post requests when adding the needed configuration at /var/www/vhosts/system/<domain>/conf/nginx.conf !

What is the condition that overwrite the file var/www/vhosts/system/<domain>/conf/nginx.conf ?

N.B: "access_log /var/www/vhosts/system/<domain>/access.log post_logs; "should be at "server " section.
 
Back
Top