Disabled and in maintenance sites now have splash pages that they are redirected to when they are unavailable.

These pages should be configurable, by the system administrator. At the very least, they should be editable, but we should probably go the extra mile and pass the domain name, and possibly a reason or timestamp to the disable script.

Examples would be that site X has been disabled due to non payment, or site y is unavailable due to being moved to a faster server or upgrading.

A timestamp in the parameters could be useful for providing information on whether a site will be deleted in a certain time frame.

Comments

adrian’s picture

This could also be a useful customer satisfaction tool.

ie: how many sites have been disabled due to insufficient features, etc.

anarcat’s picture

Very interesting idea. I originally designed the "disabled splash page" as just a redirect to a given URL but it will obviously not be sufficient in the long term.

So right now the disable and enable hooks have the $data passed so it does have some information on the site.

What it could do would be to create an actual node (disabled/site-N) with dynamic content (like "this site was disabled on $time and will be renabled in ". time()-$time . " seconds).

Of course we would need the disable hook to delete or unpublish the node.. (right?)

Other ideas?

j2parker’s picture

Currently, a disabled site is redirected to a node on the aegir site which displays "This site has been disabled by the site administrators". This is accomplished by a rewrite rule in the site's vhost config file. My aegir site is locked down so what actually displays is "You are not authorized to access this page."

What follows is how I handle disabled sites using a dedicated site and mod_proxy. These steps were performed on a server running Ubuntu 8.04 and Apache2.

1. Create a site which will handle all disabled sites. This site will require a DNS A record.

Using aegir create disabled.example.com

Access disabled.example.com using the login link provided.

Configure themes (admin/build/themes/settings)
Remove all checks and default info for both Global settings and Garland theme.

Configure blocks (admin/build/block)
Disable all blocks except Navigation
Configure Navigation block visibility settings only for authenticated user

Create Front Page (node/add/page)
Title: Site Status
Body: The requested site is currently not available. Thank you for your understanding.
Promoted to front page

2. Install mod_proxy

sudo aptitude install libapache2-mod-proxy-html

3. Correct Ubuntu mod_proxy config.

Edit /etc/apache2/mods-available/proxy.conf

	Change:

	<Proxy *>
AddDefaultCharset off
		Order deny,allow
		Deny from all
		#Allow from .example.com
	</Proxy>


	To:

	<Proxy *:80>
		AddDefaultCharset off
		Order deny,allow
	</Proxy>
	

4. Enable mod_proxy

sudo a2enmod proxy

5. Stop/Start Apache

	sudo /etc/init.d/apache2 stop
	sudo /etc/init.d/apache2 start


	Note:  sudo /etc/init.d/apache2 force-reload did not work properly here
	

6. Modify vhost config file for disabled site

	Remove:

	RewriteEngine on
	# the ? at the end is to remove any query string in the original url
	RewriteRule ^(.*)$ https://aegir.example.com/hosting/disabled/site_being_disabled.com?

	
	Add:

	RewriteEngine On

	RewriteCond %{REQUEST_URI}      !^/$
	RewriteCond %{REQUEST_URI}      !^.*\.css$
	RewriteRule ^ /? [L]
	
	ProxyPass / http://disabled.example.com/

KeepAlive Off
	

7. Reload Apache

sudo apache2ctl graceful

Now accessing the disabled site will display the front page of disabled.example.com without altering the site name in the browser address bar. A Firefox tab will, however, display disabled.example.com .

Steven Jones’s picture

Project: Hosting » Provision
Version: 5.x-0.1-alpha1 » 6.x-2.x-dev
Component: Code » API
Category: task » feature

I think we can handle the actual implementation of this in contrib, but we should make sure our API supports being able to change what is shown on the disabled page, i.e. what the vhost contains.

clemens.tolboom’s picture

The current behavior looks lame to me.
Having default access settings for hostmaster-6.x-2.x gives

This site has been disabled by the site administrators

Disable access disabled sites for anonymous gives

You are not authorized to access this page.

Still the same as reported in #2 by @j2parker

@Steven Jones I'm puzzled with #4

I think we can handle the actual implementation of this in contrib

imho we never should expose hostmaster url to our sites users to begin with. Not even through a redirect :)

ergonlogic’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Issue summary: View changes

New features need to be implemented in Aegir 3.x, then we can consider back-porting to Aegir 2.x.