Skip to content

Commit da78035

Browse files
author
Jamie Lennox
committed
Add a user variable to templates
This is a common configuration option and allows devstack (and others) to configure a mod_wsgi user to run the daemon process. Change-Id: Idf134b3bc6b08e3c3a80dde8830d5a4f3da5a06c Fixes: bug 1226346
1 parent 8e48dd6 commit da78035

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

examples/apache2/account-server.template

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
#
33
# Change %PORT% to the port that you wish to use on your system
44
# Change %SERVICENAME% to the service name you are using
5+
# Change %USER% to the system user that will run the daemon process
56
# Change the debug level as you see fit
67
#
78
# For example:
89
# Replace %PORT% by 6012
910
# Replace %SERVICENAME% by account-server-1
11+
# Replace %USER% with apache (or remove it for default)
1012

1113
NameVirtualHost *:%PORT%
1214
Listen %PORT%
1315

1416
<VirtualHost *:%PORT%>
15-
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1
17+
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 user=%USER%
1618
WSGIProcessGroup %SERVICENAME%
1719
WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
1820
WSGIApplicationGroup %{GLOBAL}

examples/apache2/container-server.template

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
#
33
# Change %PORT% to the port that you wish to use on your system
44
# Change %SERVICENAME% to the service name you are using
5+
# Change %USER% to the system user that will run the daemon process
56
# Change the debug level as you see fit
67
#
78
# For example:
89
# Replace %PORT% by 6011
910
# Replace %SERVICENAME% by container-server-1
11+
# Replace %USER% with apache (or remove it for default)
1012

1113
NameVirtualHost *:%PORT%
1214
Listen %PORT%
1315

1416
<VirtualHost *:%PORT%>
15-
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1
17+
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 user=%USER%
1618
WSGIProcessGroup %SERVICENAME%
1719
WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
1820
WSGIApplicationGroup %{GLOBAL}

examples/apache2/object-server.template

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
#
33
# Change %PORT% to the port that you wish to use on your system
44
# Change %SERVICENAME% to the service name you are using
5+
# Change %USER% to the system user that will run the daemon process
56
# Change the debug level as you see fit
67
#
78
# For example:
89
# Replace %PORT% by 6010
910
# Replace %SERVICENAME% by object-server-1
10-
11+
# Replace %USER% with apache (or remove it for default)
1112

1213
NameVirtualHost *:%PORT%
1314
Listen %PORT%
1415

1516
<VirtualHost *:%PORT%>
16-
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1
17+
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 user=%USER%
1718
WSGIProcessGroup %SERVICENAME%
1819
WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
1920
WSGIApplicationGroup %{GLOBAL}

examples/apache2/proxy-server.template

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22
#
33
# Change %PORT% to the port that you wish to use on your system
44
# Change %SERVICENAME% to the service name you are using
5+
# Change %USER% to the system user that will run the daemon process
56
# Change the debug level as you see fit
67
#
78
# For example:
89
# Replace %PORT% by 8080
910
# Replace %SERVICENAME% by proxy-server
11+
# Replace %USER% with apache (or remove it for default)
1012

1113
NameVirtualHost *:%PORT%
1214
Listen %PORT%
1315

1416
<VirtualHost *:%PORT%>
1517
# The limit of an object size
1618
LimitRequestBody 5368709122
17-
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1
19+
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 user=%USER%
1820
WSGIProcessGroup %SERVICENAME%
1921
WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
2022
WSGIApplicationGroup %{GLOBAL}

0 commit comments

Comments
 (0)