pipe – Diffuser and patch from the terminal: hunk failure

I have created patches for some system files using the following logic:

cp mpm_prefork.conf mpm_prefork.conf.original
diff -u mpm_prefork.conf.original mpm_prefork.conf

Then I copied the output to a bash script resulting in:

patch mpm_prefork.conf << & # 39; EOT & # 39;
--- mpm_prefork.conf.original 2018-12-09 17: 18: 12.281764264 +0000
+++ mpm_prefork.conf 2018-12-09 17: 21: 16.000000000 +0000
@@ -6,11 +6,11 @@
# MaxConnectionsPerChild: maximum number of requests served by a server process

 
- Start servers 5
- MinSpareServers 5
- MaxSpareServers 10
- MaxRequestWorkers 150
- MaxConnectionsPerChild 0
+ StartServers 35
+ MinSpareServers 10
+ MaxSpareServers 50
+ MaxRequestWorkers 300
+ MaxConnectionsPerChild 10000
 

 # vim: syntax = apache ts = 4 sw = 4 sts = 4 sr noet
EOT

Now if I take my mpm_prefork.conf and rename mpm_prefork.conf.original to mpm_prefork.conf and I apply this patch, and it comes out:

patching the mpm_prefork.conf file
Chunk # 1 failed at 6.
1 of 1 hunk FAILED - saving rejections to the file mpm_prefork.conf.rej

I did not change the file so it should work. Is there a problem related to pipping a diff to the patch command like I did? How can i fix this?

Thank you.