Bug 45726 - Build in a maintenance functionallity
Summary: Build in a maintenance functionallity
Status: RESOLVED LATER
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.2.8
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: MassUpdate
Depends on:
Blocks:
 
Reported: 2008-09-02 03:45 UTC by Maik Igloffstein
Modified: 2018-11-07 21:09 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maik Igloffstein 2008-09-02 03:45:23 UTC
Feature Request
===============

Hello,

if a user types in (debian)
"/etc/init.d/apache2 maintenance"

the apache2 should direct every http/https access to a default, changeable "maintenance.html" file.

Why user should need this?:
- no changes in the sites-available section is needed
- fast way to set up a maintenance page quickly, secure and clean, without touching everything, to update something


friendly regards
Maik
Comment 1 rahul 2008-09-02 05:37:34 UTC
You can do this by asking apache to run with a different configu file.
see

see http://www.dotcomunderground.com/blogs/2006/08/31/return-503-status-with-apache-webserver/


e.g
|cat maintenance.conf 
Listen 8080
ServerName agneyam
ScriptAlias / 503.sh/

|cat 503.sh
#!/bin/sh
cat <<EOF
status: 503
Content-Type: text/html


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>503 - Service temporary unavailable</title>
</head>
<body>
<h1>503 - Service temporary unavailable</h1>
<p>Sorry, this website is currently down for maintenance please
retry in a few minutes</p>
</body>
</html>
EOF

|./bin/httpd -f ./maintenance.conf                
|echo "GET / HTTP/1.0\r\n\r\n" | nc 0 8080
HTTP/1.1 503 Service Temporarily Unavailable
Date: Tue, 02 Sep 2008 12:21:52 GMT
Server: Apache/2.2.9 (Unix)
Connection: close
Content-Type: text/html


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>503 - Service temporary unavailable</title>
</head>
<body>
<h1>503 - Service temporary unavailable</h1>
<p>Sorry, this website is currently down for maintenance please
retry in a few minutes</p>
</body>
</html>
|echo "GET /abc?def HTTP/1.0\r\n\r\n" | nc 0 8080
HTTP/1.1 503 Service Temporarily Unavailable
Date: Tue, 02 Sep 2008 12:21:57 GMT
Server: Apache/2.2.9 (Unix)
Content-Length: 284
Connection: close
Content-Type: text/html


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>503 - Service temporary unavailable</title>
</head>
<body>
<h1>503 - Service temporary unavailable</h1>
<p>Sorry, this website is currently down for maintenance please
retry in a few minutes</p>
</body>
</html>
Comment 2 Rainer Jung 2018-02-25 20:39:30 UTC
Undo spam change
Comment 3 William A. Rowe Jr. 2018-11-07 21:09:37 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.