Envelope/Peak Detector
Having read the datasheet of LM7171, I have 7 suggestions:

0) is your scope fast enough (500MHz) to look for oscillations of the OpAmp

1) operate the OpAmp from 10Volts; its not characterized at only 5 volt VDD

2) use a Ground Plane

3) the datasheet says Rminvalue_feedback is 500 Ohms;

4) make sure your VDD bypass caps are 1mm (1/32") from the IC leads, or closer; use SurfaceMount bypass caps; to partially cancel inductance of PCB, place the GND via back under the bypass cap; current flows thru the cap and then must reverse and flow back a couple milliMeters, proving partial cancellation of L.

5) your rectifier circuit should work, but reduce the resistor values to up the rectification bandwith. The output node is not directly attached to the opamp, so the opamp cannot ensure the possible bandwidth is the achieved bandwidth; example: with 10pF on Vout, and 100Kohm Rfeedback, you have a 1uS tau and thus a 1uS PeakDetector.

7) to reduce risk of oscillation, place your resistors right next to the OpAmp IC; I worked with ADCs that oscillated (10milliVolts on -5.2 VDD at 900 MHz); and installing 33_ohm SMT R under the (bentup) Vin pin was the cure. Gate-stopper Rs are a safety factor in using power MOSFETS. A fast OpAmp also needs that respect for the gain-bandwidth it brings to your circuit; dampen its pins.