summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Hadas <davidh@il.ibm.com>2013-06-20 13:21:47 +0300
committerDavid Hadas <davidh@il.ibm.com>2013-06-20 21:56:21 +0300
commite872e54c2af962d1726121b7467b7140d8d60149 (patch)
tree5cd100ed6682792c9cb6ee4857b149cbea43e4a2 /examples
parentff02537d97a1f6a7976de8831fc8136f1a7ed1c0 (diff)
downloadswift-e872e54c2af962d1726121b7467b7140d8d60149.tar.gz
Add example Apache config files
This patch is needed in 1.9 as a dependency for adding swift/apache to devstack. zhang-hare is working in parallel on a devstack patch that depend on this patch. As part of this patch we add examples dir. In this dir we add template config files that can be used either by a script (as will be done by devstack) or serve a an example to the admin. Apache2 vhost files were added under examples/apache2 Wsgi files were added under examples/wsgi Fixes: Bug #1191388 Change-Id: If90e38a0ba36f6b59016d4a1374f4100f0bbee7b
Diffstat (limited to 'examples')
-rw-r--r--examples/apache2/account-server.template23
-rw-r--r--examples/apache2/container-server.template23
-rw-r--r--examples/apache2/object-server.template24
-rw-r--r--examples/apache2/proxy-server.template25
-rw-r--r--examples/wsgi/account-server.wsgi.template14
-rw-r--r--examples/wsgi/container-server.wsgi.template14
-rw-r--r--examples/wsgi/object-server.wsgi.template14
-rw-r--r--examples/wsgi/proxy-server.wsgi.template14
8 files changed, 151 insertions, 0 deletions
diff --git a/examples/apache2/account-server.template b/examples/apache2/account-server.template
new file mode 100644
index 000000000..e39bf25b1
--- /dev/null
+++ b/examples/apache2/account-server.template
@@ -0,0 +1,23 @@
+# Account Server VHOST Template For Apache2
+#
+# Change %PORT% to the port that you wish to use on your system
+# Change %SERVICENAME% to the service name you are using
+# Change the debug level as you see fit
+#
+# For example:
+# Replace %PORT% by 6012
+# Replace %SERVICENAME% by account-server-1
+
+NameVirtualHost *:%PORT%
+Listen %PORT%
+
+<VirtualHost *:%PORT%>
+ WSGIDaemonProcess %SERVICENAME% processes=5 threads=1
+ WSGIProcessGroup %SERVICENAME%
+ WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
+ WSGIApplicationGroup %{GLOBAL}
+ LimitRequestFields 200
+ ErrorLog /var/log/%APACHE_NAME%/%SERVICENAME%
+ LogLevel debug
+ CustomLog /var/log/%APACHE_NAME%/access.log combined
+</VirtualHost>
diff --git a/examples/apache2/container-server.template b/examples/apache2/container-server.template
new file mode 100644
index 000000000..e4ff7ce2c
--- /dev/null
+++ b/examples/apache2/container-server.template
@@ -0,0 +1,23 @@
+# Container Server VHOST Template For Apache2
+#
+# Change %PORT% to the port that you wish to use on your system
+# Change %SERVICENAME% to the service name you are using
+# Change the debug level as you see fit
+#
+# For example:
+# Replace %PORT% by 6011
+# Replace %SERVICENAME% by container-server-1
+
+NameVirtualHost *:%PORT%
+Listen %PORT%
+
+<VirtualHost *:%PORT%>
+ WSGIDaemonProcess %SERVICENAME% processes=5 threads=1
+ WSGIProcessGroup %SERVICENAME%
+ WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
+ WSGIApplicationGroup %{GLOBAL}
+ LimitRequestFields 200
+ ErrorLog /var/log/%APACHE_NAME%/%SERVICENAME%
+ LogLevel debug
+ CustomLog /var/log/%APACHE_NAME%/access.log combined
+</VirtualHost>
diff --git a/examples/apache2/object-server.template b/examples/apache2/object-server.template
new file mode 100644
index 000000000..c8aaee1d5
--- /dev/null
+++ b/examples/apache2/object-server.template
@@ -0,0 +1,24 @@
+# Object Server VHOST Template For Apache2
+#
+# Change %PORT% to the port that you wish to use on your system
+# Change %SERVICENAME% to the service name you are using
+# Change the debug level as you see fit
+#
+# For example:
+# Replace %PORT% by 6010
+# Replace %SERVICENAME% by object-server-1
+
+
+NameVirtualHost *:%PORT%
+Listen %PORT%
+
+<VirtualHost *:%PORT%>
+ WSGIDaemonProcess %SERVICENAME% processes=5 threads=1
+ WSGIProcessGroup %SERVICENAME%
+ WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
+ WSGIApplicationGroup %{GLOBAL}
+ LimitRequestFields 200
+ ErrorLog /var/log/%APACHE_NAME%/%SERVICENAME%
+ LogLevel debug
+ CustomLog /var/log/%APACHE_NAME%/access.log combined
+</VirtualHost>
diff --git a/examples/apache2/proxy-server.template b/examples/apache2/proxy-server.template
new file mode 100644
index 000000000..4066ad60d
--- /dev/null
+++ b/examples/apache2/proxy-server.template
@@ -0,0 +1,25 @@
+# Proxy Server VHOST Template For Apache2
+#
+# Change %PORT% to the port that you wish to use on your system
+# Change %SERVICENAME% to the service name you are using
+# Change the debug level as you see fit
+#
+# For example:
+# Replace %PORT% by 8080
+# Replace %SERVICENAME% by proxy-server
+
+NameVirtualHost *:%PORT%
+Listen %PORT%
+
+<VirtualHost *:%PORT%>
+ # The limit of an object size
+ LimitRequestBody 5368709122
+ WSGIDaemonProcess %SERVICENAME% processes=5 threads=1
+ WSGIProcessGroup %SERVICENAME%
+ WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
+ WSGIApplicationGroup %{GLOBAL}
+ LimitRequestFields 200
+ ErrorLog /var/log/%APACHE_NAME%/%SERVICENAME%
+ LogLevel debug
+ CustomLog /var/log/%APACHE_NAME%/access.log combined
+</VirtualHost>
diff --git a/examples/wsgi/account-server.wsgi.template b/examples/wsgi/account-server.wsgi.template
new file mode 100644
index 000000000..51bcc00d9
--- /dev/null
+++ b/examples/wsgi/account-server.wsgi.template
@@ -0,0 +1,14 @@
+# Account Server wsgi Template
+#
+# Change %SERVICECONF% to the service conf file you are using
+#
+# For example:
+# Replace %SERVICECONF% by account-server/1.conf
+#
+# This file than need to be saved under /var/www/swift/%SERVICENAME%.wsgi
+# * Replace %SERVICENAME% with the service name you use your system
+# E.g. Replace %SERVICENAME% by account-server-1
+
+from swift.common.wsgi import init_request_processor
+application, conf, logger, log_name = \
+ init_request_processor('/etc/swift/%SERVICECONF%','account-server')
diff --git a/examples/wsgi/container-server.wsgi.template b/examples/wsgi/container-server.wsgi.template
new file mode 100644
index 000000000..bebd3e6a4
--- /dev/null
+++ b/examples/wsgi/container-server.wsgi.template
@@ -0,0 +1,14 @@
+# Container Server wsgi Template
+#
+# Change %SERVICECONF% to the service conf file you are using
+#
+# For example:
+# Replace %SERVICECONF% by container-server/1.conf
+#
+# This file than need to be saved under /var/www/swift/%SERVICENAME%.wsgi
+# * Replace %SERVICENAME% with the service name you use your system
+# E.g. Replace %SERVICENAME% by container-server-1
+
+from swift.common.wsgi import init_request_processor
+application, conf, logger, log_name = \
+ init_request_processor('/etc/swift/%SERVICECONF%','container-server')
diff --git a/examples/wsgi/object-server.wsgi.template b/examples/wsgi/object-server.wsgi.template
new file mode 100644
index 000000000..afcb14324
--- /dev/null
+++ b/examples/wsgi/object-server.wsgi.template
@@ -0,0 +1,14 @@
+# Object Server wsgi Template
+#
+# Change %SERVICECONF% to the service conf file you are using
+#
+# For example:
+# Replace %SERVICECONF% by object-server/1.conf
+#
+# This file than need to be saved under /var/www/swift/%SERVICENAME%.wsgi
+# * Replace %SERVICENAME% with the service name you use your system
+# E.g. Replace %SERVICENAME% by object-server-1
+
+from swift.common.wsgi import init_request_processor
+application, conf, logger, log_name = \
+ init_request_processor('/etc/swift/%SERVICECONF%','object-server')
diff --git a/examples/wsgi/proxy-server.wsgi.template b/examples/wsgi/proxy-server.wsgi.template
new file mode 100644
index 000000000..1a48afeca
--- /dev/null
+++ b/examples/wsgi/proxy-server.wsgi.template
@@ -0,0 +1,14 @@
+# Proxy Server wsgi Template
+#
+# Change %SERVICECONF% to the service conf file you are using
+#
+# For example:
+# Replace %SERVICECONF% by proxy-server.conf
+#
+# This file than need to be saved under /var/www/swift/%SERVICENAME%.wsgi
+# * Replace %SERVICENAME% with the service name you use your system
+# E.g. Replace %SERVICENAME% by proxy-server
+
+from swift.common.wsgi import init_request_processor
+application, conf, logger, log_name = \
+ init_request_processor('/etc/swift/%SERVICECONF%','proxy-server')