We run our own server (Debian) with many virtual domains. For many of the newer sites using Drupal, we've followed the protocol of installing Drupal -- in /home/drupal/public_html -- with each site getting it's own directory in /home/drupal/public_html/sites/mysite.com.
For all modules and themes we install in /home/drupal/public_html/sites/all/modules (or themes) and that works very well.
Works very well as long as we point mysite.com to /home/drupal/public_html in Apache vhosts.conf. All this certainly takes a load-off from reinstalling updates in each domain.
However we have a few domains that are quite old (mid-90's) and have extensive hierarchy of static files. We would like to upgrade those sites to Drupal over time. So here's the question...
I could overlay Drupal in /home/old-site/public_html, then use Front Page to keep the old site look & feel and even use menus to point to older pages and use this setup while -- over time -- we would convert old material to Drupal pages. And vhosts.conf would stay as it is for that domain.
But doing so would require doing twice the number of core/module/theme upgrades, a pain I'd rather avoid.
Alternatively, could I install all the old site content files under /home/drupal/public_html/sites/mysite.com - and then change vhosts and get the benefit of single upgrades?
Or (third option) could I use symbolic links under /sites/mysite.com that link to the old site files and directories?
Are there other ways to approach this dilemma? Thanks for any thoughts on this.
Jeremy
On Fri, May 16, 2008 at 9:13 PM, Tenant tenant@tenant.net wrote:
We run our own server (Debian) with many virtual domains. For many of the newer sites using Drupal, we've followed the protocol of installing Drupal -- in /home/drupal/public_html -- with each site getting it's own directory in /home/drupal/public_html/sites/mysite.com.
For all modules and themes we install in /home/drupal/public_html/sites/all/modules (or themes) and that works very well.
Works very well as long as we point mysite.com to /home/drupal/public_html in Apache vhosts.conf. All this certainly takes a load-off from reinstalling updates in each domain.
However we have a few domains that are quite old (mid-90's) and have extensive hierarchy of static files. We would like to upgrade those sites to Drupal over time. So here's the question...
I could overlay Drupal in /home/old-site/public_html, then use Front Page to keep the old site look & feel and even use menus to point to older pages and use this setup while -- over time -- we would convert old material to Drupal pages. And vhosts.conf would stay as it is for that domain.
But doing so would require doing twice the number of core/module/theme upgrades, a pain I'd rather avoid.
Alternatively, could I install all the old site content files under /home/drupal/public_html/sites/mysite.com - and then change vhosts and get the benefit of single upgrades?
Or (third option) could I use symbolic links under /sites/mysite.com that link to the old site files and directories?
I don't fully understand how you want it to work, but when Drupal looks at sites/sitename it only expects to find a settings.php file containing a database url. It will serve no site files from there.
Are there other ways to approach this dilemma? Thanks for any thoughts on this.
Jeremy
-- [ Drupal support list | http://lists.drupal.org/ ]
This is incorrect. At least in the case of Apache and standard Drupal rewrite rules. Drupal doesn't look through directories for files to be served, Apache does, as it is the web server, Drupal is just the application running on top of it. All Drupal pages are served by accessing index.php, either directly in the form of example.com/ index.php?q=node/12 or through an Apache rewrite rule that redirects requests such as example.com/node/12 to the former address. The way that the rewrites work, is that when a request to a file such as example.com/node/12 comes in, apache tries to find that file, if there is a directory called node, and a file in it called 12, then Drupal will never be bootstrapped, because Apaches rewrites files that it can't find, to Drupal. This is how the static files of Drupal are able to be served up.
In short if you type in a URL to an existing file, Apache (or whatever webserver you are using) should serve it without bootstrapping Drupal. If it can't find that file, it will ask Drupal to bootstrap and return the corresponding content. If Drupal doesn't know a page at the request path, then it will return a 404.
So if you put static html throughout your Drupal directory, yes it will work, and the files will be served.
One heads up before you start this, is that by default directory listing is disabled in .htaccess, and the only index handler enabled is index.php. If you want to send your users to example.com/some/ static/directory/content/here/ and have the index.html, or index.htm file served automatically, then you will need to add that to the index handler section of your .htaccess.
-Mike
On May 17, 2008, at 12:19 PM, Cog Rusty wrote:
I don't fully understand how you want it to work, but when Drupal looks at sites/sitename it only expects to find a settings.php file containing a database url. It will serve no site files from there.
__________________ Michael Prasuhn mike@mikeyp.net http://mikeyp.net 503.488.5433 714.356.0168 cell 949.200.7670 fax