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
This commit is contained in:
Jamie Lennox 2013-09-17 11:46:04 +10:00
parent 8e48dd6b7f
commit da78035043
4 changed files with 12 additions and 5 deletions

View File

@ -2,17 +2,19 @@
# #
# Change %PORT% to the port that you wish to use on your system # Change %PORT% to the port that you wish to use on your system
# Change %SERVICENAME% to the service name you are using # Change %SERVICENAME% to the service name you are using
# Change %USER% to the system user that will run the daemon process
# Change the debug level as you see fit # Change the debug level as you see fit
# #
# For example: # For example:
# Replace %PORT% by 6012 # Replace %PORT% by 6012
# Replace %SERVICENAME% by account-server-1 # Replace %SERVICENAME% by account-server-1
# Replace %USER% with apache (or remove it for default)
NameVirtualHost *:%PORT% NameVirtualHost *:%PORT%
Listen %PORT% Listen %PORT%
<VirtualHost *:%PORT%> <VirtualHost *:%PORT%>
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 user=%USER%
WSGIProcessGroup %SERVICENAME% WSGIProcessGroup %SERVICENAME%
WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
WSGIApplicationGroup %{GLOBAL} WSGIApplicationGroup %{GLOBAL}

View File

@ -2,17 +2,19 @@
# #
# Change %PORT% to the port that you wish to use on your system # Change %PORT% to the port that you wish to use on your system
# Change %SERVICENAME% to the service name you are using # Change %SERVICENAME% to the service name you are using
# Change %USER% to the system user that will run the daemon process
# Change the debug level as you see fit # Change the debug level as you see fit
# #
# For example: # For example:
# Replace %PORT% by 6011 # Replace %PORT% by 6011
# Replace %SERVICENAME% by container-server-1 # Replace %SERVICENAME% by container-server-1
# Replace %USER% with apache (or remove it for default)
NameVirtualHost *:%PORT% NameVirtualHost *:%PORT%
Listen %PORT% Listen %PORT%
<VirtualHost *:%PORT%> <VirtualHost *:%PORT%>
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 user=%USER%
WSGIProcessGroup %SERVICENAME% WSGIProcessGroup %SERVICENAME%
WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
WSGIApplicationGroup %{GLOBAL} WSGIApplicationGroup %{GLOBAL}

View File

@ -2,18 +2,19 @@
# #
# Change %PORT% to the port that you wish to use on your system # Change %PORT% to the port that you wish to use on your system
# Change %SERVICENAME% to the service name you are using # Change %SERVICENAME% to the service name you are using
# Change %USER% to the system user that will run the daemon process
# Change the debug level as you see fit # Change the debug level as you see fit
# #
# For example: # For example:
# Replace %PORT% by 6010 # Replace %PORT% by 6010
# Replace %SERVICENAME% by object-server-1 # Replace %SERVICENAME% by object-server-1
# Replace %USER% with apache (or remove it for default)
NameVirtualHost *:%PORT% NameVirtualHost *:%PORT%
Listen %PORT% Listen %PORT%
<VirtualHost *:%PORT%> <VirtualHost *:%PORT%>
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 user=%USER%
WSGIProcessGroup %SERVICENAME% WSGIProcessGroup %SERVICENAME%
WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
WSGIApplicationGroup %{GLOBAL} WSGIApplicationGroup %{GLOBAL}

View File

@ -2,11 +2,13 @@
# #
# Change %PORT% to the port that you wish to use on your system # Change %PORT% to the port that you wish to use on your system
# Change %SERVICENAME% to the service name you are using # Change %SERVICENAME% to the service name you are using
# Change %USER% to the system user that will run the daemon process
# Change the debug level as you see fit # Change the debug level as you see fit
# #
# For example: # For example:
# Replace %PORT% by 8080 # Replace %PORT% by 8080
# Replace %SERVICENAME% by proxy-server # Replace %SERVICENAME% by proxy-server
# Replace %USER% with apache (or remove it for default)
NameVirtualHost *:%PORT% NameVirtualHost *:%PORT%
Listen %PORT% Listen %PORT%
@ -14,7 +16,7 @@ Listen %PORT%
<VirtualHost *:%PORT%> <VirtualHost *:%PORT%>
# The limit of an object size # The limit of an object size
LimitRequestBody 5368709122 LimitRequestBody 5368709122
WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 WSGIDaemonProcess %SERVICENAME% processes=5 threads=1 user=%USER%
WSGIProcessGroup %SERVICENAME% WSGIProcessGroup %SERVICENAME%
WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi WSGIScriptAlias / /var/www/swift/%SERVICENAME%.wsgi
WSGIApplicationGroup %{GLOBAL} WSGIApplicationGroup %{GLOBAL}