I think that your main problem is that you have done something wrong with the .htaccess configuration in the subdirectory. But let's take this step by step.
First in the .htaccess Maker page find the Allow direct access to these files textarea and add the following lines
/pdf-upload/index.php
/pdf-upload/upload.php
This will allow users who have already gone through the password authentication to access these files.
From an SSH terminal go into your site's pdf-upload folder and type
htpasswd -c `pwd`/.htpasswd yourusername
Where yourusername is the username you want to use. You will be asked for a password, twice. This creates the initial .htpasswd file.
Now we need its absolute filename — because the .htaccess file requires the full filename, not just a relative one (yeah, I know, it's annoying!). In the SSH terminal type:
echo `pwd`/.htpasswd
This will reply with something like the following:
/home/myuser/public_html/pdf-upload/.htpasswd
Copy that. We'll need it in the next step.
Create a .htaccess file in the pdf-upload folder with the following content:
AuthName "Your dialog prompt"
AuthType Basic
AuthUserFile /home/myuser/public_html/pdf-upload/.htpasswd
Require valid-user
You need to change the things in bold type.
Your dialog prompt is what the browser authentication dialog title will be when someone tries to access the pdf-upload folder.
/home/myuser/public_html/pdf-upload/.htpasswd is what we copied from the echo command output earlier.
I have tested this with Apache 2.4. If you have a different web server your mileage may vary.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!