CRAFT_BASE_PATH problems when installing Craft 3 in subdirectory
If I understand correctly, take the content of web and place it in subdir so you have:

html/
├── subdir/
│   └── craft/ (config, vendor, templates, .env etc)
│   └── cpresources
│   └── .htaccess
│   └── index.php
└── the main site


Then in index.php do :

define('CRAFT_BASE_PATH', dirname(__DIR__) . '/subdir/craft');

And you should have your craft site accessible at mainsite.com/subdir