How can I avoid the installation directory appears in the site URLs?
Set server DocumentRoot to Drupal folder

As mentioned by @leymannx you have to configure your server virtual host to use the drupal1 as the DocumentRoot. 

&lt;VirtualHost *:80&gt;
    ...
    DocumentRoot /path/to/drupal1/

    &lt;Directory /path/to/drupal1&gt;
      AllowOverride All
    &lt;/Directory&gt;
    ...
&lt;/VirtualHost&gt;


RewriteBase on a shared host (in Drupal .htaccess)

If you're on a shared host you won't have access to change DocumentRoot. Instead, you can adjust RewriteBase in Drupal .htaccess file (or $base_url in settings.php). 

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a  
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
RewriteBase /drupal1