I'm trying to understand Drupal multisite install which no matter what I try does not work. I have read and applied steps from most of the instructionals and tutorials.
Set up in /var/www/html.
I have 127.0.0.1 site1 localhost in /etc/hosts
I have DocumentRoot, ServerAdmin, ServerName,RewriteEngine, etc set up in <VirtualHost> in httpd.conf (Fedora14)
I have first.com/sites/default and first.com/sites/site1 which has settings.php renamed from default.settings.php chmod 777 on /sites/site1 and chmod 666 on settings.php
localhost/first.com works and is operational localhost/first.com/site1 gives Not Found error localhost/site1 gives Not Found error localhost/first.com.site1 gives Not Found error
errorlog reports [Sun May 15 05:44:47 2011] [error] [client 127.0.0.1] File does not exist: /var/www/html/first.com/site1
accesslog reports 127.0.0.1 - - [15/May/2011:05:44:47 +1000] "GET /first.com/site1 HTTP/1.1" 404 288
Is this a problem with /var/ww/html, should I have a directory in /home/user and set ServerRoot to that directory?
I'm trying to understand the role of .htaccess on my local machine because on the remote server I cannot alter httpd.conf so overrides have to be in the root .htaccess and this also has me stumped. Should I put the <VirtualHost> in .htaccess and leave httpd.conf untouched. It does not discuss this in the tutorials that I have read.
Thanks in advance Roger
Hi Roger,
On 15/05/11 06:55 +1000, Roger wrote:
I'm trying to understand Drupal multisite install which no matter what I localhost/first.com works and is operational localhost/first.com/site1 gives Not Found error localhost/site1 gives Not Found error localhost/first.com.site1 gives Not Found error
You need to acces the sites by their name, so you set up virtual hosts for your first (site1), second (site2) and following hostnames (siteN), all pointing to /var/www/html
You also create hostnames for them, either in /etc/hosts or with a nameserver. If your webserver is on the same machine as your webbrowser, you put
127.0.0.1 site1 127.0.0.1 site2 127.0.0.1 siteN
Then you cp the /home/www/html/sites/default/ Directory to /home/www/html/sites/site1 and /home/www/html/sites/site2 (and /home/www/html/sites/siteN).
The installer should be available with your browser at http://site1 http://site2 http://siteN
Hope that helps.
File does not exist: /var/www/html/first.com/site1
You have an error in the URL and maybe in your setup.
Is this a problem with /var/ww/html, should I have a directory in /home/user and set ServerRoot to that directory?
Which directory you choose is up to you. It just needs to be pointed to in your virtual host configuration. Remember that you need to point every virtual host of a multisite installation to the root of your drupal installation (/var/www/html in your case).
I'm trying to understand the role of .htaccess on my local machine because on the remote server I cannot alter httpd.conf so overrides have to be in the root .htaccess and this also has me stumped. Should I put the <VirtualHost> in .htaccess and leave httpd.conf untouched. It does not discuss this in the tutorials that I have read.
I think you can't configure virtual hosts in .htaccess.
regards Rolf