the side of upper thigh
This seems to be a case of Meralgia Paresthetica.
In this disease the lateral femoral cutaneous nerve is compressed by inguinal ligament leading to the type of pain described by you.
According to me the latter option is the more effective one.
If this treatment is not effective a surgery is required but that is very rare.
Other possible but less likely cause is compression on the nerve supplying the area in lower spine by a prolapsed disc.Diagnosis of this cause would need a MRI of lumbar spine but initial treatment using anti inflammatory analgesics like Motrin is successful in most cases.