Serve WordPress in root path of Apache

After copying WordPress files in the DocumentRoot of Apache server. I found that URLs where rendered as wordpress/qwe.

So I removed all the files in DocumentRoot and installed WordPress again. By copying the contents, NOT the directory, of the downloaded WordPress to the DocumentRoot of Apache server.

Installation makes the URLs to be in the root: localhost/index.php and and the links in the pages also localhost/qwe, i.e. without wordpress.

I did not change anything in configuration files, everything I did was from the browser.