Hello, I have a problem with my server configration for running Drupal from subdomain. The server is running Debian Lenny and ISPConfig 3. I have successfully running http://www.mydomain.tld/ and would like to run http://drupal.mydomain.tld.

There is a folder /var/www/clients/client1/web1/web for the main domain and /var/www/clients/client1/web1/web/_drupal for the subdomain.

The .htaccess in the subdomain folder looks like:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

The Apache conf for the domain looks like:

<Directory /var/www/mydomain.tld>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/mydomain.tld/web

    ServerName mydomain.tld
    ServerAlias *.mydomain.tld
    ServerAlias drupal.mydomain.tld
    ServerAdmin webmaster@mydomain.tld

    ErrorLog /var/log/ispconfig/httpd/mydomain.tld/error.log


    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 503 /error/503.html

    <Directory /var/www/mydomain.tld/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web1/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
    <IfModule mod_fcgid.c>
      # SocketPath /tmp/fcgid_sock/
      IdleTimeout 3600
      ProcessLifeTime 7200
      # MaxProcessCount 1000
      DefaultMinClassProcessCount 3
      DefaultMaxClassProcessCount 100
      IPCConnectTimeout 8
      IPCCommTimeout 360
      BusyTimeout 300
    </IfModule>
    <Directory /var/www/mydomain.tld/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
        <Directory /var/www/clients/client1/web1/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^drupal.mydomain.tld [NC]
    RewriteRule   ^/(.*)$ /_drupal/$1  [L]

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web1 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>

</VirtualHost>

The homepage of http://drupal.mydomain.tld works well, but all other pages, for example http://drupal.mydomain.tld/node returns with 500 Internal Server Error. The Apache's error_log has this record:
"[Tue Oct 19 20:14:16 2010] [error] [client XX.XX.XX.XX] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace."

Could anyone help me, please?

Comments

sreyas’s picture

You have .htaccess in the _drupal folder which enable the clean url for your drupal installation. uncomment and update the line

RewriteBase /_drupal

Let us know how it goes.

------------
Regards
Ciril
Sreyas IT Solutions
Drupal Server Administration

------------------
Ciril Sreedhar
Sreyas IT Solutions
Server Administration | Web Designing | Web Programming

maxiorel’s picture

Thanks, RewriteBase should normally help, but not in this case. It didn't work.

Meanwhile I have found the solution. There is it for others having the same problem:

RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]

The "/" was the magic character ;-)

Jan Polzer, Drupal & Symfony developer

andy2708’s picture

Thank you Jan!
This saved me so much time. I never would have tried that either.

thank you!!!