Sometimes sites are up. Sometimes they are down.

Events happening in the community are now at Drupal community events on www.drupal.org.
tomsherlock's picture

Garrett, aliasghar, nwwoman, redndahead and criznach just recently assisted me in getting multsite up and running on my Mac with the Apache 2.2, php 5.2.9 and MySQL 5.1.35. I am not using MAMP.

The clincher for me was including the line Order allow,deny in the DocumentRoot's Directory section.

However the white screens have returned. Some times they come, some times they go. I am able to consistently access localhost, localhost/test.php and localhost/phpmyadmin.

I installed the back up of a production site locally. So It is possible that this is causing the problems. I'm getting tons of errors from it. If so, I will probably have to look to another Drupal group/forum for assistance. Would the patch that nwwoman mentioned address this problem? I'll check that thread.

So far the only thing that can remove the white screens is rebooting.

I wonder if I need to add Order allow,deny for each website? However they each share the same DocumentRoot. So I'm not sure if that is the solution.

Comments

some points

pendashteh's picture

some ponits:
1)
these are my apache config:

# from httpd.conf
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>
<Directory "/Documents/web/www">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

#from httpd-vhosts.conf
NameVirtualHost * : *
<Directory "/Documents/web/drupal">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
<VirtualHost * : *>
    DocumentRoot "/Documents/web/drupal"
    ServerName site1.com
</VirtualHost>
<VirtualHost * : *>
    DocumentRoot "/Documents/web/drupal"
    ServerName site2.com
</VirtualHost>

2)
sometimes files in /tmp folder set in php.ini make some problems usually for database connections. on problem check if truncating the tmp directory whould help.

3)
If you use a single database for your different websites and use table prefix then you should take care of not affecting a wrong site's tables during update backup. (check if using separated databases would help).

4)
add the code below to your settings.php files:

<?php
error_reporting
(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
?>

take a look at The White Screen of Death for farther information.

Interesting. It looks like

tomsherlock's picture

Interesting. It looks like the DocumentRoot in httpd.conf is different from all of your VirtualHost's DocumentRoots.

Also your DocumentRoots appear to start just below the user's account at '/Documents'. I have mine starting at '/Users'. Or is your /Document at the same level as my /Users (which is just above 'Macintosh HD').

Otherwise the settings of the first two Document sections are similar to mine. execCGI and MultiViews are different.

DocumentRoot "/Users/username/Sites/drupal"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "/Users/username/Sites/drupal/">

    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all

</Directory>

So If I followed your configuration than:
DocumentRoot "/Users/tjsherlock/Sites/some-other-folder"
or maybe
DocumentRoot "/Sites/some-other-folder"

And this is what i have for my virtual hosts in etc/apache2/extra/httpd-vhosts.conf

<VirtualHost *:80>
    ServerAdmin webmaster@mysite0.dev
    DocumentRoot "/Users/username/Sites/drupal"
    ServerName mysite0.dev
    ServerAlias www.mysite0.dev
    ErrorLog "/private/var/log/apache2/error_log"
    CustomLog "/private/var/log/apache2/access_log" common
</VirtualHost>


#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
    ServerAdmin webmaster@mysite1.dev
    DocumentRoot "/Users/username/Sites/drupal"
    ServerName mysite1.dev
    ServerAlias www.mysite1.dev
    ErrorLog "/private/var/log/apache2/mysite1.dev-error_log"
    CustomLog "/private/var/log/apache2/mysite1.dev-access_log" common
</VirtualHost>


<VirtualHost *:80>
    ServerAdmin webmaster@mysite2.dev
    DocumentRoot "/Users/username/Sites/drupal"
    ServerName mysite2.dev
    ServerAlias www.mysite2.dev
    ErrorLog "/private/var/log/apache2/mysite2.dev-error_log"
    CustomLog "/private/var/log/apache2/mysite2.dev-access_log" common
</VirtualHost>

So, that code for the settings.php, does it print to the screen or post to the log?

Thanks for the tips.

The php error codes make php

pendashteh's picture

The php error codes make php produce and show the error on the page, so you will see if there is a Fatal error causing white death page.

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: