Initial Import
This commit is contained in:
commit
44d65f34c3
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/BAK/*
|
||||
/log_*
|
||||
/apr*
|
||||
/httpd*
|
||||
/mod_fcgid*
|
||||
/mod_perl*
|
8
DOC/.htacces.FORWARD_FRAME
Normal file
8
DOC/.htacces.FORWARD_FRAME
Normal file
@ -0,0 +1,8 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
RewriteRule ^index\.html$ - [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . /index.html [L]
|
||||
</IfModule>
|
12
DOC/README.Exclude_Files_and_Directories_From_Apache_Auth
Normal file
12
DOC/README.Exclude_Files_and_Directories_From_Apache_Auth
Normal file
@ -0,0 +1,12 @@
|
||||
<Location "/">
|
||||
AuthType Basic
|
||||
AuthName "Restricted Files"
|
||||
AuthUserFile /var/www/clients/client12/web17/passwd
|
||||
AuthGroupFile /dev/null
|
||||
Require valid-user
|
||||
SetEnvIf Request_URI "^/(admin|skin|js|index)(.*)$" allow
|
||||
SetEnvIf Request_URI "^/favicon.ico$" allow
|
||||
Order allow,deny
|
||||
Allow from env=allow
|
||||
Satisfy Any
|
||||
</Location>
|
33
DOC/README.apache_mpm_event
Normal file
33
DOC/README.apache_mpm_event
Normal file
@ -0,0 +1,33 @@
|
||||
Apache 2.4 default values MPM event
|
||||
===================================
|
||||
|
||||
<IfModule mpm_event_module>
|
||||
StartServers 3
|
||||
MinSpareThreads 75
|
||||
MaxSpareThreads 250
|
||||
ThreadsPerChild 25
|
||||
MaxRequestWorkers 400
|
||||
MaxConnectionsPerChild 0
|
||||
</IfModule>
|
||||
|
||||
|
||||
ServerLimit = MaxRequestWorkers / ThreadsPerChild
|
||||
|
||||
MaxRequestWorkers = 400
|
||||
ThreadsPerChild = 25
|
||||
=> ServerLimit = 16 (apache 2.4 default)
|
||||
|
||||
simultanous connections = ThreadsPerChild * ServerLimit = MaxRequestWorkers
|
||||
=> simultanous Connection = 400
|
||||
|
||||
(ND Server)
|
||||
==========
|
||||
|
||||
## - MaxConnectionsPerChild
|
||||
## -
|
||||
## - We want every httpd prozess to restart aproximately once a day
|
||||
## -
|
||||
Set MaxConnectionsPerChild = (requests/per day)/ServerLimit
|
||||
requests / day ~ 1.600.000
|
||||
/ServerLimit = 16
|
||||
=> MaxConnectionsPerChild = 1600000/16 = 100000 = 100.000
|
68
DOC/README.fcgi
Normal file
68
DOC/README.fcgi
Normal file
@ -0,0 +1,68 @@
|
||||
|
||||
## - 1.) Installiere fcgi
|
||||
## -
|
||||
|
||||
mkdir -p /usr/local/src/fcgi
|
||||
cd /usr/local/src/fcgi
|
||||
|
||||
wget http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz
|
||||
|
||||
gunzip < fcgi-2.4.0.tar.gz | tar -xf -
|
||||
cd fcgi-2.4.0
|
||||
|
||||
## - !! Bemerkung !!
|
||||
## -
|
||||
## - Die Datei include/fcgio.h muss angepasst werden.
|
||||
## -
|
||||
## - Ergänze hinter der Zeile die "#include <iostream>" enthält:
|
||||
## -
|
||||
## - #include <cstdio>
|
||||
## -
|
||||
|
||||
## -----------------------
|
||||
|
||||
diff -Naur fcgi-2.4.0-ORIG/include/fcgio.h fcgi-2.4.0/include/fcgio.h
|
||||
--- fcgi-2.4.0-ORIG/include/fcgio.h 2002-02-25 14:16:11.000000000 +0100
|
||||
+++ fcgi-2.4.0/include/fcgio.h 2011-02-24 13:19:35.000000000 +0100
|
||||
@@ -31,6 +31,7 @@
|
||||
#define FCGIO_H
|
||||
|
||||
#include <iostream>
|
||||
+#include <cstdio>
|
||||
|
||||
#include "fcgiapp.h"
|
||||
|
||||
## -----------------------
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
|
||||
## - 2.) Installiere mod_fcgi
|
||||
## -
|
||||
|
||||
cd /usr/local/src/apache2
|
||||
|
||||
wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz
|
||||
|
||||
gunzip < mod_fastcgi-2.4.6.tar.gz | tar -xf -
|
||||
|
||||
cd mod_fastcgi-2.4.6
|
||||
|
||||
cp Makefile.AP2 Makefile
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
## - Add to httpd.conf
|
||||
## -
|
||||
## - #
|
||||
## - # mod_fastcgi
|
||||
## - #
|
||||
## - LoadModule fastcgi_module modules/mod_fastcgi.so
|
||||
## -
|
||||
vim /usr/local/apache2/conf/httpd.conf
|
||||
|
||||
|
14
DOC/README.ldap
Normal file
14
DOC/README.ldap
Normal file
@ -0,0 +1,14 @@
|
||||
## - Some configure scripts cannot find ldap library.
|
||||
## -
|
||||
## - So create a symlink
|
||||
## - /usr/lib/libldap.so -> /usr/lib/x86_64-linux-gnu/libldap.so
|
||||
## -
|
||||
ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so
|
||||
## - or
|
||||
ln -s x86_64-linux-gnu/libldap.so /usr/lib/libldap.so
|
||||
|
||||
## - Note:
|
||||
## -
|
||||
## - If 'apr' and apr-utils' wasn't compiled with ldap support (that
|
||||
## - is, if libldap.so wasn't present), recompile both
|
||||
## -
|
81
DOC/README.modfcgid
Normal file
81
DOC/README.modfcgid
Normal file
@ -0,0 +1,81 @@
|
||||
## - Configure mod_fcgid
|
||||
## -
|
||||
## - see also: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#examples
|
||||
## -
|
||||
|
||||
httpd.conf
|
||||
=========
|
||||
|
||||
LoadModule fcgid_module modules/mod_fcgid.so
|
||||
<IfModule mod_fcgid.c>
|
||||
|
||||
# in Abstimmung mit PHP variablen
|
||||
# post_max_size = 128M
|
||||
# (upload_max_filesize = 32)
|
||||
#
|
||||
# 134217728 = 128*1024*1024 =128M
|
||||
#
|
||||
FcgidMaxRequestLen 134217728
|
||||
|
||||
# By default, PHP FastCGI processes exit after handling 500 requests,
|
||||
# and they may exit after this module has already connected to the
|
||||
# application and sent the next request. When that occurs, an error
|
||||
# will be logged and 500 Internal Server Error will be returned to
|
||||
# the client. This PHP behavior can be disabled by setting
|
||||
# PHP_FCGI_MAX_REQUESTS to 0, but that can be a problem if the PHP
|
||||
# application leaks resources. Alternatively, PHP_FCGI_MAX_REQUESTS
|
||||
# can be set to a much higher value than the default to reduce the
|
||||
# frequency of this problem. FcgidMaxRequestsPerProcess can be set to
|
||||
# a value less than or equal to PHP_FCGI_MAX_REQUESTS to resolve the
|
||||
# roblem.
|
||||
FcgidMaxRequestsPerProcess 500
|
||||
|
||||
</IfModule>
|
||||
|
||||
|
||||
vhost config
|
||||
============
|
||||
|
||||
<VirtualHost <ip-address>:<port>>
|
||||
|
||||
...
|
||||
|
||||
DocumentRoot "/var/www/adm.warenform.de/htdocs/"
|
||||
<Directory /var/www/adm.warenform.de/htdocs/>
|
||||
FCGIWrapper /var/www/adm.warenform.de/conf/fcgid .php
|
||||
<FilesMatch \.php$>
|
||||
SetHandler fcgid-script
|
||||
</FilesMatch>
|
||||
AllowOverride All
|
||||
Options +ExecCGI -Indexes
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
...
|
||||
|
||||
<//VirtualHost>
|
||||
|
||||
|
||||
/var/www/adm.warenform.de/conf/fcgid
|
||||
====================================
|
||||
|
||||
|
||||
|
||||
#!/bin/sh
|
||||
export PHPRC="/var/www/adm.warenform.de/conf/"
|
||||
export TMPDIR="/var/www/adm.warenform.de/tmp"
|
||||
|
||||
# PHP child process management (PHP_FCGI_CHILDREN) should
|
||||
# always be disabled with mod_fcgid, which will only route one
|
||||
# request at a time to application processes it has spawned;
|
||||
# thus, any child processes created by PHP will not be used
|
||||
# effectively. (Additionally, the PHP child processes may not
|
||||
# be terminated properly.) By default, and with the environment
|
||||
# variable setting PHP_FCGI_CHILDREN=0, PHP child process
|
||||
# management is disabled.
|
||||
PHP_FCGI_CHILDREN=0
|
||||
export PHP_FCGI_CHILDREN
|
||||
|
||||
exec /usr/local/php-5.3.28/bin/php-cgi
|
||||
|
||||
|
1
DOC/apache_benchmark.test
Normal file
1
DOC/apache_benchmark.test
Normal file
@ -0,0 +1 @@
|
||||
/usr/local/apache2/bin/ab -c 1 -n 1 -C JSESSIONID=FD80667D7583DB886A59418638AD06F5 http://localhost:8080/opdb/core/consult_new/show.do
|
34
DOC/config_ciphers_apache2.2.txt
Normal file
34
DOC/config_ciphers_apache2.2.txt
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
## - must go here - NOT in VirtualHost section !!
|
||||
## -
|
||||
SSLCompression off
|
||||
|
||||
<VirtualHost <ip-addresss>:443>
|
||||
|
||||
...
|
||||
|
||||
SSLEngine on
|
||||
|
||||
## - don't support weak ciphers
|
||||
SSLStrictSNIVHostCheck off
|
||||
SSLHonorCipherOrder on
|
||||
SSLCompression off
|
||||
SSLProtocol ALL -SSLv2 -SSLv3
|
||||
SSLCipherSuite 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'
|
||||
|
||||
## - HTTP Strict Transport Security (HSTS)
|
||||
## -
|
||||
## - HSTS tells a browser that the website should only be accessed through
|
||||
## - a secure connection. The HSTS header will be remembered by a standard
|
||||
## compliant browser for max-age seconds.
|
||||
## -
|
||||
## - Remember this settings for 1/2 year
|
||||
## -
|
||||
Header add Strict-Transport-Security "max-age=15768000"
|
||||
|
||||
SSLCertificateFile ..
|
||||
SSLCertificateKeyFile ..
|
||||
SSLCertificateChainFile ..
|
||||
...
|
||||
|
||||
</VirtualHost>
|
42
DOC/config_pfs_apache2.4.txt
Normal file
42
DOC/config_pfs_apache2.4.txt
Normal file
@ -0,0 +1,42 @@
|
||||
<VirtualHost <ip-addresss>:443>
|
||||
|
||||
...
|
||||
|
||||
SSLEngine on
|
||||
|
||||
## - don't support weak ciphers
|
||||
SSLHonorCipherOrder On
|
||||
SSLCompression Off
|
||||
SSLProtocol ALL -SSLv2 -SSLv3
|
||||
SSL_Cipher_Suite='ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'
|
||||
|
||||
|
||||
## - HTTP Strict Transport Security (HSTS)
|
||||
## -
|
||||
## - HSTS tells a browser that the website should only be accessed through
|
||||
## - a secure connection. The HSTS header will be remembered by a standard
|
||||
## - compliant browser for max-age seconds.
|
||||
## -
|
||||
## - An important point is that HSTS only works after the user has received the
|
||||
## - header via HTTPS. So you will still need to have a redirect from your
|
||||
## - HTTP-site to HTTPS, also for supporting browsers that still do not understand
|
||||
## - HSTS.
|
||||
## -
|
||||
## - This is easily accomplished using Apache’s mod_rewrite:
|
||||
## -
|
||||
## - <IfModule mod_rewrite.c>
|
||||
## - RewriteEngine On
|
||||
## - RewriteCond %{HTTPS} off
|
||||
## - RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
||||
## - </IfModule>
|
||||
## -
|
||||
## - Thus, with a few lines of configuration, you can make the web a safer place to
|
||||
## - be for your users. So, what are you waiting for?
|
||||
## -
|
||||
## - Remember this settings for 1/2 year
|
||||
## -
|
||||
Header add Strict-Transport-Security "max-age=15768000"
|
||||
|
||||
...
|
||||
|
||||
</VirtualHost>
|
17
DOC/index.html.FORWARD_FRAME
Normal file
17
DOC/index.html.FORWARD_FRAME
Normal file
@ -0,0 +1,17 @@
|
||||
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Willkommensnetzwerk "Pankow Hilft!"</TITLE>
|
||||
</HEAD>
|
||||
<FRAMESET ROWS="*,0">
|
||||
<FRAME SRC="http://pankowhilft.blogsport.de/" NORESIZE>
|
||||
<NOFRAMES>
|
||||
Your browser does not support frames. </ br>
|
||||
|
||||
Klicke hier: <a href:"http://pankowhilft.blogsport.de">pankowhilft.blogsport.de </a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</NOFRAMES>
|
||||
</FRAMESET>
|
||||
</HTML>
|
12
Files/0000-logformat.conf
Normal file
12
Files/0000-logformat.conf
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
## - %a remote IP-address
|
||||
## - %v ServerName of requested site
|
||||
## - %{%T %Y-%m-%d}t date time - custom
|
||||
## - %t date time - apache default
|
||||
## - %{User-Agent}i user agent
|
||||
## - %U requested URL
|
||||
## - %r First line of request.
|
||||
## - %>s real status code
|
||||
## - $T The time taken to serve the request, in seconds
|
||||
## -
|
||||
LogFormat "%a %v %p %t %r %>s \"%{User-Agent}i\" %T" base_requests
|
24
Files/error_707/index.html
Normal file
24
Files/error_707/index.html
Normal file
@ -0,0 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>HTTP Fehler 707</title>
|
||||
<head>
|
||||
|
||||
<table width="368" cellpadding="3" cellspacing="5">
|
||||
<tr height=30></tr>
|
||||
<tr>
|
||||
<td width="50"></td>
|
||||
<td valign="top" align="left"><img border="0" src="info.jpg" width="25" height="33"></td>
|
||||
<td valign="center" width="360" align="right">
|
||||
<h1 style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 22pt; font-size: 22pt; font-family: verdana; color: black;">HTTP Fehler 707</h1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50"></td>
|
||||
<td colspan=2>
|
||||
<hr color="#c0c0c0" noshade="noshade">
|
||||
<h1 style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 15pt; font-size: 13pt; font-family: verdana; color: black;">Das Ende des Internets ist ereicht.</h1>
|
||||
<h1 style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 10pt; font-size: 9pt; font-family: verdana; color: black;">Beim nächsten Klick wird Ihr Computer abstürzen.</h1>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</html>
|
BIN
Files/error_707/info.jpg
Normal file
BIN
Files/error_707/info.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
62
Files/maintenance.html
Normal file
62
Files/maintenance.html
Normal file
@ -0,0 +1,62 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Maintenance / Wartungsarbeiten</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
background: #eee;
|
||||
font: normal normal 16px/140% Arial, Helvetica, Trebuchet MS, Geneva, sans-serif;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
}
|
||||
h2 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
.Container {
|
||||
background: #fff;
|
||||
width: 825px;
|
||||
}
|
||||
.Content {
|
||||
background: #fff;
|
||||
font-size: 12px;
|
||||
height: 400px;
|
||||
line-height: 16px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="Container">
|
||||
|
||||
<div class="Logo"></div>
|
||||
|
||||
<div class="Content">
|
||||
|
||||
<h1>Wartungsarbeiten</h1>
|
||||
<h2>Die Website wird gerade überarbeitet.</h2>
|
||||
<p>Bitte versuchen Sie es später noch einmal.</p>
|
||||
<p>Vielen Dank für Ihr Verständnis!</p>
|
||||
|
||||
<h1>Maintenance</h1>
|
||||
<h2>The website is down for maintenance at the moment.</h2>
|
||||
<p>Please try again later.</p>
|
||||
<p>Thank You very much!</p>
|
||||
|
||||
</div><!-- .Content -->
|
||||
</div><!-- .Container -->
|
||||
|
||||
</body>
|
||||
</html>
|
62
Files/no_such_site.html
Normal file
62
Files/no_such_site.html
Normal file
@ -0,0 +1,62 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>HTTP Error 404 / Http Fehler 404</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
background: #eee;
|
||||
font: normal normal 16px/140% Arial, Helvetica, Trebuchet MS, Geneva, sans-serif;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
}
|
||||
h2 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
.Container {
|
||||
background: #fff;
|
||||
width: 825px;
|
||||
}
|
||||
.Content {
|
||||
background: #fff;
|
||||
font-size: 12px;
|
||||
height: 400px;
|
||||
line-height: 16px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="Container">
|
||||
|
||||
<div class="Logo"></div>
|
||||
|
||||
<div class="Content">
|
||||
|
||||
<h1>HTTP Error 404</h1>
|
||||
<h2>The site you have requestet was not found on this Server</h2>
|
||||
<p>Please check your spelling and ry again.</p>
|
||||
<p>Thank You very much!</p>
|
||||
|
||||
<h1>HTTP Fehler 404</h1>
|
||||
<h2>Die von Ihnen aufgerufene Seite gibt es leider nicht - Sorry</h2>
|
||||
<p>Bitte prüfen Sie die Adresse und versuchen es nochmals.</p>
|
||||
<p>Vielen Dank für Ihr Verständnis!</p>
|
||||
|
||||
</div><!-- .Content -->
|
||||
</div><!-- .Container -->
|
||||
|
||||
</body>
|
||||
</html>
|
8
Files/phpinfo.php
Normal file
8
Files/phpinfo.php
Normal file
@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>PHP Info</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php phpinfo(); ?>
|
||||
</body>
|
||||
</html>
|
62
Files/under_construction.html
Normal file
62
Files/under_construction.html
Normal file
@ -0,0 +1,62 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Maintenance / Wartungsarbeiten</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
background: #eee;
|
||||
font: normal normal 16px/140% Arial, Helvetica, Trebuchet MS, Geneva, sans-serif;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
}
|
||||
h2 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
.Container {
|
||||
background: #fff;
|
||||
width: 825px;
|
||||
}
|
||||
.Content {
|
||||
background: #fff;
|
||||
font-size: 12px;
|
||||
height: 400px;
|
||||
line-height: 16px;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="Container">
|
||||
|
||||
<div class="Logo"></div>
|
||||
|
||||
<div class="Content">
|
||||
|
||||
<h1>Seite im Aufbau</h1>
|
||||
<h2>Diese Website wird in Kürze online gehen..</h2>
|
||||
<p>Bitte versuchen Sie es später noch einmal.</p>
|
||||
<p>Vielen Dank für Ihr Verständnis!</p>
|
||||
|
||||
<h1>Site under construction</h1>
|
||||
<h2>This website will go online soon.</h2>
|
||||
<p>Please try again later.</p>
|
||||
<p>Thank You very much!</p>
|
||||
|
||||
</div><!-- .Content -->
|
||||
</div><!-- .Container -->
|
||||
|
||||
</body>
|
||||
</html>
|
579
install_httpd-2.2.sh
Executable file
579
install_httpd-2.2.sh
Executable file
@ -0,0 +1,579 @@
|
||||
#!/bin/bash
|
||||
|
||||
# httpd Apapche Webserver
|
||||
#
|
||||
|
||||
## - CHANGE PARAMETER TO PASS YXOUR SITUATION--------
|
||||
## -
|
||||
VERSION=2.2.24
|
||||
PHP_VERSION=5.3.26
|
||||
RUBY_VERSION=1.8.6-p420
|
||||
#PREFIX=/usr/local/httpd-${VERSION}
|
||||
#PREFIX=/usr/local/httpd-${VERSION}_php-${PHP_VERSION}
|
||||
PREFIX=/usr/local/httpd-${VERSION}_ruby-${RUBY_VERSION}
|
||||
|
||||
## - substitude path "/usr/local/httpd-$VERSION" to "/usr/local/apache2"
|
||||
## - in apache configuration files ?
|
||||
## -
|
||||
subst_base_path=false
|
||||
|
||||
HTTPD_GROUP=www-data
|
||||
HTTPD_USER=www-data
|
||||
|
||||
SERVER_NAME=`hostname -f`
|
||||
SERVER_ADMIN="admin@warenform.de"
|
||||
|
||||
|
||||
APACHE_LOG_DIR=/var/log/apache
|
||||
DIRECTORY_INDEX="index.html index.htm index.php"
|
||||
|
||||
# : ${_arch:=i686}
|
||||
# : ${_arch:=athlon}
|
||||
: ${_arch:=k8} ## --> x86-64 instructionset
|
||||
|
||||
#_cflags="-O2 -march=$_arch "
|
||||
|
||||
|
||||
## - DO NOT CHANGE ----------------------------------
|
||||
## -
|
||||
|
||||
_httpdconf=${PREFIX}/conf/httpd.conf
|
||||
_rel_confextra_path=conf/extra
|
||||
|
||||
_backup_suffix=".BAK"
|
||||
|
||||
_srcdir=/usr/local/src/apache2
|
||||
_logdir=${_srcdir}/log_`basename $PREFIX`_build
|
||||
|
||||
_pwd=`pwd`
|
||||
_builddir=${_srcdir}/`basename $PREFIX`
|
||||
|
||||
|
||||
## -- some functions -- ##
|
||||
|
||||
echo_ok() {
|
||||
echo -e " [ \033[32mok\033[m ]"
|
||||
}
|
||||
echo_failed(){
|
||||
echo -e " [ \033[1;31mfailed\033[m ]"
|
||||
}
|
||||
|
||||
|
||||
## --------------------------------------------------
|
||||
|
||||
[ -d $_logdir ] || mkdir -p $_logdir > /dev/null 2>&1
|
||||
|
||||
|
||||
## - Generate code for a 64-bit environment ?
|
||||
## -
|
||||
[ "athlon64" = "$_arch" -o "k8" = "$_arch" -o "opteron" = "$_arch" -o "athlon-fx" = "$_arch" ] && _cflags="$_cflags -m64"
|
||||
|
||||
cd $_srcdir
|
||||
gunzip < ${_srcdir}/httpd-$VERSION.tar.gz | tar -xpf -
|
||||
chown -R root.root httpd-$VERSION
|
||||
mv httpd-$VERSION ${_builddir}
|
||||
cd $_builddir
|
||||
|
||||
## - LDFLAGS="-s" --> Remove all symbol table and relocation information from the executable.
|
||||
## -
|
||||
echo -e "\n\tgoing to configure.."
|
||||
echo -e "\t(see ${_logdir}/httpd-configure.log for more details)"
|
||||
## F77="/usr/bin/g77-3.4" \
|
||||
## CXXCPP="/usr/bin/g++-3.4 -E" \
|
||||
## CC="/usr/bin/gcc-3.4" \
|
||||
## CXX="/usr/bin/g++-3.4" \
|
||||
## CPP="/usr/bin/cpp-3.4" \
|
||||
##CFLAGS="$_cflags" \
|
||||
LDFLAGS="-s" \
|
||||
./configure --prefix=$PREFIX \
|
||||
--with-included-apr \
|
||||
--enable-ssl \
|
||||
--enable-info \
|
||||
--enable-proxy \
|
||||
--enable-proxy-connect \
|
||||
--enable-proxy-ftp \
|
||||
--enable-proxy-http \
|
||||
--enable-proxy-balancer \
|
||||
--enable-deflate \
|
||||
--enable-rewrite \
|
||||
--enable-cache \
|
||||
--enable-mem-cache \
|
||||
--enable-dav \
|
||||
--enable-headers \
|
||||
--enable-so \
|
||||
--with-dbm=db4 \
|
||||
--enable-expires \
|
||||
--with-berkeley-db=/usr \
|
||||
> ${_logdir}/httpd-configure.log 2>&1 || exit 1
|
||||
|
||||
## --enable-authz-dbm \
|
||||
## --enable-authn-dbm \
|
||||
## --with-berkeley-db=/usr/local/BerkeleyDB.4.4.20 \
|
||||
## --target=i686-pc-linux-gnu \
|
||||
## --build=i686-pc-linux-gnu | tee ../httpd-$VERSION-install.log
|
||||
## --disable-nls \
|
||||
|
||||
|
||||
echo -e "\n\tgoing to compile.."
|
||||
echo -e "\t(see ${_logdir}/httpd-make.log for more details)"
|
||||
make > ${_logdir}/httpd-make.log 2>&1 || exit 1
|
||||
|
||||
echo -e "\n\tgoing to install.."
|
||||
echo -e "\t(see ${_logdir}/httpd-make_install.log for more details)"
|
||||
make install > ${_logdir}/httpd-make_install.log 2>&1 || exit 1
|
||||
|
||||
|
||||
## - do some post-installatin tasks..
|
||||
## -
|
||||
echo
|
||||
echo -e "\t-----------------------------"
|
||||
echo -e "\t-- post installation tasks --"
|
||||
echo -e "\t-----------------------------"
|
||||
|
||||
if [ -f $_httpdconf ];then
|
||||
cp $_httpdconf $_httpdconf.ORIG
|
||||
|
||||
if $subst_base_path ; then
|
||||
## - set BasePath to httpd.conf
|
||||
## -
|
||||
echo ""
|
||||
echo -e "\tsubstitute \"$PREFIX\" with \"/usr/local/apache2\""
|
||||
echo -e -n "\tin file $_httpdconf.."
|
||||
sed -i$_backup_suffix -e "s#$PREFIX#/usr/local/apache2#g" $_httpdconf
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm -f $_httpdconf$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
## - set BasePath to all conf files in conf/extra
|
||||
## -
|
||||
if [ -d $PREFIX/$_rel_confextra_path ]; then
|
||||
cd $PREFIX/$_rel_confextra_path
|
||||
_files=`ls *.conf`
|
||||
for _file in $_files ;do
|
||||
echo ""
|
||||
echo -e "\tsubstitute \"$PREFIX\" with \"/usr/local/apache2\""
|
||||
echo -n -e "\t in file $_file.."
|
||||
sed -i$_backup_suffix -e "s#$PREFIX#/usr/local/apache2#g" $_file
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm -f $_file$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
## - set User
|
||||
echo ""
|
||||
echo -n -e "\tset User to \"$HTTPD_USER\".."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^(([ ^t]*User ).*)$&## \1\n\2${HTTPD_USER}&g" \
|
||||
$_httpdconf
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm -f $_httpdconf$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
## - set Group
|
||||
echo ""
|
||||
echo -n -e "\tset Group to \"$HTTPD_GROUP\".."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^(([ ^t]*Group ).*)$&## \1\n\2${HTTPD_GROUP}&g" \
|
||||
$_httpdconf
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm -f $_httpdconf$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
## - set ServerAdmin
|
||||
## -
|
||||
echo ""
|
||||
echo -n -e "\tset ServerAdmin to \"$SERVER_ADMIN\".."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^(([ ^t]*ServerAdmin ).*)$&## \1\n\2${SERVER_ADMIN}&g" \
|
||||
$_httpdconf
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm -f $_httpdconf$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
## - set ServerName
|
||||
## -
|
||||
echo ""
|
||||
echo -n -e "\tset ServerName to \"$SERVER_NAME\".."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^(([ ^t]*)#?(ServerName ).*)$&## \1\n\2\3${SERVER_NAME}&g" \
|
||||
$_httpdconf
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm -f $_httpdconf$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
## - set DirectoryIndex
|
||||
## -
|
||||
echo ""
|
||||
echo -n -e "\tset DirectoryIndex to \"$DIRECTORY_INDEX\".."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^([ ^t]*)(DirectoryIndex )(.*)$&\1## \2\3\n\1\2${DIRECTORY_INDEX}&g" \
|
||||
$_httpdconf
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm -f $_httpdconf$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
## - set log-directory and concerning entries
|
||||
## -
|
||||
echo ""
|
||||
echo -n -e "\tset log-directory to $APACHE_LOG_DIR\".."
|
||||
mkdir -p $APACHE_LOG_DIR > /dev/null 2>&1
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
echo ""
|
||||
echo -n -e "\tset ErrorLog.."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^(([ ^t]*ErrorLog ).*)$&## \1\n\2${APACHE_LOG_DIR}/error_log&g" \
|
||||
$_httpdconf > /dev/null 2>&1
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
echo ""
|
||||
echo -n -e "\tset CustomLog.."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^([ ^t]*)(CustomLog )(.*)$&\1## \2\3\n\1\2${APACHE_LOG_DIR}/access_log combined&g" \
|
||||
$_httpdconf > /dev/null 2>&1
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm -f $_httpdconf$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p $PREFIX/conf/vhosts
|
||||
cat <<EOF >>$_httpdconf
|
||||
|
||||
ServerSignature Off
|
||||
ServerTokens ProductOnly
|
||||
|
||||
include conf/vhosts/*.conf
|
||||
EOF
|
||||
|
||||
## - Listen on certain ip(s) ?
|
||||
## -
|
||||
_ips=""
|
||||
_substitute=""
|
||||
_substitute_ssl=""
|
||||
echo ""
|
||||
echo "if you want the webserver to listen on certain ip(s)"
|
||||
echo "put a blank seperatet list an type <return>"
|
||||
echo "otherwise leaf blank and type <return>"
|
||||
echo ""
|
||||
echo -n "put in ip(s): "
|
||||
read _ips
|
||||
if [ ! "X" = "X$_ips" ]; then
|
||||
|
||||
echo ""
|
||||
echo -e "\tInsert Listen directive(s) - Port 80 - for ip-address(es)"
|
||||
echo -n -e "\t\"$_ips\" in file $_httpdconf.."
|
||||
for _ip in $_ips ; do
|
||||
_substitute="Listen $_ip:80\n$_substitute"
|
||||
_substitute_ssl="Listen $_ip:443\n$_substitute_ssl"
|
||||
done
|
||||
sed -i$_backup_suffix -r -e "s#^(Listen 80.*)#\#\# \1\n$_substitute#g" $_httpdconf > /dev/null 2>&1
|
||||
if [ "0" = "$?" ];then
|
||||
echo_ok
|
||||
rm $_httpdconf$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
fi
|
||||
|
||||
## - enable ssl ?
|
||||
## -
|
||||
_ssl=""
|
||||
echo
|
||||
echo -n "do you want to enable ssl conections for the given ip(s) [y/n]: "
|
||||
read _ssl
|
||||
if [ "y" = "$_ssl" -o "Y" = "$_ssl" -o "Yes" = "$_ssl" -o "yes" = "$_ssl" ];then
|
||||
|
||||
_notice=""
|
||||
|
||||
## - copy certification files if present..
|
||||
if [ -f $_srcdir/server.crt -a -f $_srcdir/server.key ];then
|
||||
cp $_srcdir/server.crt $PREFIX/conf/
|
||||
cp $_srcdir/server.key $PREFIX/conf/
|
||||
else
|
||||
_notice="CERTIFICATES NOT PRESENT"
|
||||
fi
|
||||
|
||||
## - include httpd-ssl.conf
|
||||
_file=httpd-ssl.conf
|
||||
if [ -f ${PREFIX}/${_rel_confextra_path}/${_file} ]; then
|
||||
echo
|
||||
echo -n -e "\tinclude file \"$_file\".."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&[ ^t]*#([ ^t]*#*[ ^t]*)*(Include $_rel_confextra_path/$_file).*$&\2&g" \
|
||||
$_httpdconf > /dev/null 2>&1
|
||||
if [ "0" = "$?" ];then
|
||||
rm $_httpdconf$_backup_suffix
|
||||
echo_ok
|
||||
if [ ! "X" = "X$_notice" ];then
|
||||
echo ""
|
||||
echo -e "\t[ \033[1;33m$_notice\033[m ]: \033[33m"
|
||||
echo -e "\tSSL Connections are enabled but no (default) certificates"
|
||||
echo -e "\tare present !! So the webserver will not start. "
|
||||
echo -e "\tPut your certificate named as \"server.crt\" and the concerning"
|
||||
echo -e "\tkey named as \"server.key\" into directory $PREFIX/conf/"
|
||||
echo ""
|
||||
echo -e "\tAlternatively you can comment in the the line containing"
|
||||
echo -e "\t\"Include conf/extra/http-ssl.conf\" directive for now"
|
||||
echo -e "\tto get a running webserver - without SSL enabled.\033[m"
|
||||
fi
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
fi
|
||||
|
||||
## - if given, setting the ip(s) to Listen
|
||||
echo ""
|
||||
echo -e "\tInsert Listen directive(s) - Port 443 - for ip-address(es)"
|
||||
echo -n -e "\t\"$_ips\" in file ${_file}.."
|
||||
if [ ! "X" = "X$_ips" ]; then
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s#^(Listen 443.*)#\#\# \1\n$_substitute_ssl#g" \
|
||||
${PREFIX}/${_rel_confextra_path}/${_file} > /dev/null 2>&1
|
||||
if [ "0" = "$?" ];then
|
||||
echo_ok
|
||||
rm ${PREFIX}/${_rel_confextra_path}/${_file}$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
fi
|
||||
|
||||
## - set ServerName
|
||||
## -
|
||||
echo ""
|
||||
echo -n -e "\tin $_file set ServerAdmin.."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^(([ ^t]*ServerName ).*)$&## \1\n\2${SERVER_NAME}&g" \
|
||||
${PREFIX}/${_rel_confextra_path}/${_file} > /dev/null 2>&1
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm ${PREFIX}/${_rel_confextra_path}/${_file}$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
## - set ServerAdmin
|
||||
## -
|
||||
echo ""
|
||||
echo -n -e "\tin $_file set ServerAdmin.."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^(([ ^t]*ServerAdmin ).*)$&## \1\n\2${SERVER_ADMIN}&g" \
|
||||
${PREFIX}/${_rel_confextra_path}/${_file} > /dev/null 2>&1
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm ${PREFIX}/${_rel_confextra_path}/${_file}$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
|
||||
## - set log entries
|
||||
## -
|
||||
echo ""
|
||||
echo -n -e "\tin $_file set ErrorLog.."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^(([ ^t]*ErrorLog ).*)$&## \1\n\2${APACHE_LOG_DIR}/error_log&g" \
|
||||
${PREFIX}/${_rel_confextra_path}/${_file} > /dev/null 2>&1
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm ${PREFIX}/${_rel_confextra_path}/${_file}$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
echo -n -e "\tin $_file set TransferLog.."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^(([ ^t]*TransferLog ).*)$&## \1\n\2${APACHE_LOG_DIR}/access_log&g" \
|
||||
${PREFIX}/${_rel_confextra_path}/${_file} > /dev/null 2>&1
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm ${PREFIX}/${_rel_confextra_path}/${_file}$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
echo -n -e "\tin $_file set CustomLog.."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^(([ ^t]*CustomLog ).*)$&## \1\n\2${APACHE_LOG_DIR}/ssl_request_log \\\&g" \
|
||||
${PREFIX}/${_rel_confextra_path}/${_file} > /dev/null 2>&1
|
||||
if [ "0" = $? ]; then
|
||||
echo_ok
|
||||
rm ${PREFIX}/${_rel_confextra_path}/${_file}$_backup_suffix
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
## - include conf files from conf/extra
|
||||
## -
|
||||
_file=httpd-default.conf
|
||||
if [ -f ${PREFIX}/${_rel_confextra_path}/${_file} ];then
|
||||
echo
|
||||
echo -n -e "\tinclude file \"$_file\".."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&[ ^t]*#([ ^t]*#*[ ^t]*)*(Include $_rel_confextra_path/$_file).*$&\2&g" \
|
||||
$_httpdconf > /dev/null 2>&1
|
||||
if [ "0" = "$?" ];then
|
||||
rm $_httpdconf$_backup_suffix
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
fi
|
||||
|
||||
_file=httpd-info.conf
|
||||
if [ -f ${PREFIX}/${_rel_confextra_path}/${_file} ];then
|
||||
echo
|
||||
echo -n -e "\tinclude file \"$_file\".."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&[ ^t]*#([ ^t]*#*[ ^t]*)*(Include $_rel_confextra_path/$_file).*$&\2&g" \
|
||||
$_httpdconf > /dev/null 2>&1
|
||||
if [ "0" = "$?" ];then
|
||||
rm $_httpdconf$_backup_suffix
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
echo
|
||||
echo -e "\tsetup \"$_file\" to allow urls \"server-status\""
|
||||
echo -n -e "\tand server-info from localhost.."
|
||||
|
||||
_localhost="127.0.0.0/8"
|
||||
#[ "X" != "X$_ips" ] && _localhost="$_localhost $_ips"
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&^([ ^t]*Allow[ ^t]?from).*$&\1 $_localhost&g" \
|
||||
${PREFIX}/${_rel_confextra_path}/${_file} > /dev/null 2>&1
|
||||
if [ "0" = "$?" ];then
|
||||
rm ${PREFIX}/${_rel_confextra_path}/${_file}$_backup_suffix
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
fi
|
||||
|
||||
_file=httpd-languages.conf
|
||||
if [ -f ${PREFIX}/${_rel_confextra_path}/${_file} ];then
|
||||
echo
|
||||
echo -n -e "\tinclude file \"$_file\".."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&[ ^t]*#([ ^t]*#*[ ^t]*)*(Include $_rel_confextra_path/$_file).*$&\2&g" \
|
||||
$_httpdconf > /dev/null 2>&1
|
||||
if [ "0" = "$?" ];then
|
||||
rm $_httpdconf$_backup_suffix
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
fi
|
||||
|
||||
_file=httpd-multilang-errordoc.conf
|
||||
if [ -f ${PREFIX}/${_rel_confextra_path}/${_file} ];then
|
||||
echo
|
||||
echo -n -e "\tinclude file \"$_file\".."
|
||||
sed -i$_backup_suffix -r \
|
||||
-e "s&[ ^t]*#([ ^t]*#*[ ^t]*)*(Include $_rel_confextra_path/$_file).*$&\2&g" \
|
||||
$_httpdconf > /dev/null 2>&1
|
||||
if [ "0" = "$?" ];then
|
||||
rm $_httpdconf$_backup_suffix
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fi
|
||||
|
||||
## - Set "LanguagePriority"
|
||||
sed -i -r -e "s/^(\s*)(LanguagePriority.*)de\ *(.*)$/\1\2\3/g" ${PREFIX}/${_rel_confextra_path}/${_file}
|
||||
sed -i -r -e "s/^(\s*)(LanguagePriority)(.*)$/\1\2 de\3/g" ${PREFIX}/${_rel_confextra_path}/${_file}
|
||||
fi
|
||||
|
||||
_set_link=""
|
||||
echo
|
||||
echo -n "do you want to set symlink /usr/local/apache2 -> `basename $PREFIX` ? [y/n]: "
|
||||
read _set_link
|
||||
if [ "y" = "$_set_link" -o "Y" = "$_set_link" -o "Yes" = "$_set_link" -o "yes" = "$_set_link" ];then
|
||||
if [ -L /usr/local/apache2 ];then
|
||||
rm -f /usr/local/apache2
|
||||
fi
|
||||
ln -s `basename $PREFIX` /usr/local/apache2
|
||||
fi
|
||||
|
||||
_set_link=""
|
||||
echo
|
||||
echo -n "do you want to set symlink /etc/init.d/apache2 -> $PREFIX/bin/apachectl ? [y/n]: "
|
||||
read _set_link
|
||||
if [ "y" = "$_set_link" -o "Y" = "$_set_link" -o "Yes" = "$_set_link" -o "yes" = "$_set_link" ];then
|
||||
if [ -L /etc/init.d/apache2 ];then
|
||||
rm -f /etc/init.d/apache2
|
||||
fi
|
||||
ln -s $PREFIX/bin/apachectl /etc/init.d/apache2 > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
## mkdir $PREFIX/conf/{ssl.crt,ssl.key}
|
||||
## cp $_srcdir/server.crt $PREFIX/conf/ssl.crt
|
||||
## cp $_srcdir/server.key $PREFIX/conf/ssl.key
|
||||
|
||||
|
||||
## - special for debian. set manpath entries
|
||||
## -
|
||||
if [ -f /etc/manpath.config ];then
|
||||
if ! grep /usr/local/apache2/man /etc/manpath.config > /dev/null 2<&1 ; then
|
||||
echo >> /etc/manpath.config
|
||||
echo "MANDATORY_MANPATH /usr/local/apache2/man /var/cache/man" >> /etc/manpath.config
|
||||
echo "MANPATH_MAP /usr/local/apache2/bin /usr/local/apache2/man" >> /etc/manpath.config
|
||||
echo "MANDB_MAP /usr/local/apache2/man /var/cache/man" >> /etc/manpath.config
|
||||
fi
|
||||
elif [ -f /etc/man.conf];then
|
||||
if ! grep /opt/apache2/man /etc/man.conf > /dev/null 2<&1 ; then
|
||||
echo >> /etc/man.conf
|
||||
echo "MANPATH /opt/apache2/man /var/cache/man" >> /etc/man.conf
|
||||
echo "MANPATH_MAP /opt/apache2/bin /opt/apache2/man" >> /etc/man.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
## - Add /usr/local/apache2/bin to the systems PATH variable
|
||||
## -
|
||||
_checkdir=`dirname $PREFIX`/apache2/bin
|
||||
if [ -f /etc/profile ]; then
|
||||
if ! grep -e "$_checkdir" /etc/profile > /dev/null 2<&1 ; then
|
||||
perl -i -n -p -e "s#^([ ]*export[ ]*PATH.*$)#check_dir=$_checkdir\nif [ -d \"\\\$check_dir\" ];then\n PATH=\\\${check_dir}:\\\$PATH\nfi\n\n\1#" /etc/profile > /dev/null 2<&1
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $pwd
|
||||
|
||||
echo
|
||||
exit 0
|
3530
install_httpd-2.4.sh
Executable file
3530
install_httpd-2.4.sh
Executable file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user