Skip to main content
4 of 5
deleted 4 characters in body
leymannx
  • 18.8k
  • 6
  • 72
  • 126

Check both site's .htaccess files and find the lines where it says RewriteBase etc.

Your first site's .htaccess needs:

  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  RewriteBase /

And your seconds site's .htaccess needs:

  # 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 /myFolder

Apart from that your vhost file should have the following directives included.

<VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com *.example.com

    ServerAdmin [email protected]
    DocumentRoot /var/www/html
    
    <Directory />
        Options -Indexes
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog /var/log/apache2/example_com_error.log
    LogLevel warn
    CustomLog /var/log/apache2/example_com_access.log combined
</VirtualHost>
leymannx
  • 18.8k
  • 6
  • 72
  • 126