With config option NOVA_USE_MOD_WSGI=True nova-ec2-api handles
requests on /ec2 URL.
Change-Id: I0c2e99bf8b5e5cf53cd176685b206038a4b0f78b
| ... | ... |
@@ -14,3 +14,12 @@ Listen %PUBLICPORT% |
| 14 | 14 |
%SSLCERTFILE% |
| 15 | 15 |
%SSLKEYFILE% |
| 16 | 16 |
</VirtualHost> |
| 17 |
+ |
|
| 18 |
+Alias /ec2 %PUBLICWSGI% |
|
| 19 |
+<Location /ec2> |
|
| 20 |
+ SetHandler wsgi-script |
|
| 21 |
+ Options +ExecCGI |
|
| 22 |
+ WSGIProcessGroup nova-ec2-api |
|
| 23 |
+ WSGIApplicationGroup %{GLOBAL}
|
|
| 24 |
+ WSGIPassAuthorization On |
|
| 25 |
+</Location> |
| ... | ... |
@@ -440,13 +440,18 @@ function create_nova_accounts {
|
| 440 | 440 |
|
| 441 | 441 |
# EC2 |
| 442 | 442 |
if [[ "$KEYSTONE_CATALOG_BACKEND" = "sql" ]]; then |
| 443 |
- |
|
| 443 |
+ local nova_ec2_api_url |
|
| 444 |
+ if [[ "$NOVA_USE_MOD_WSGI" == "False" ]]; then |
|
| 445 |
+ nova_ec2_api_url="$EC2_SERVICE_PROTOCOL://$SERVICE_HOST:$EC2_SERVICE_PORT/" |
|
| 446 |
+ else |
|
| 447 |
+ nova_ec2_api_url="$EC2_SERVICE_PROTOCOL://$SERVICE_HOST/ec2" |
|
| 448 |
+ fi |
|
| 444 | 449 |
get_or_create_service "ec2" "ec2" "EC2 Compatibility Layer" |
| 445 | 450 |
get_or_create_endpoint "ec2" \ |
| 446 | 451 |
"$REGION_NAME" \ |
| 447 |
- "$EC2_SERVICE_PROTOCOL://$SERVICE_HOST:8773/" \ |
|
| 448 |
- "$EC2_SERVICE_PROTOCOL://$SERVICE_HOST:8773/" \ |
|
| 449 |
- "$EC2_SERVICE_PROTOCOL://$SERVICE_HOST:8773/" |
|
| 452 |
+ "$nova_ec2_api_url" \ |
|
| 453 |
+ "$nova_ec2_api_url" \ |
|
| 454 |
+ "$nova_ec2_api_url" |
|
| 450 | 455 |
fi |
| 451 | 456 |
fi |
| 452 | 457 |
|