# Cannot serve Galaxy-ng using relative path in nginx

**URL:** <https://forum.ansible.com/t/cannot-serve-galaxy-ng-using-relative-path-in-nginx/5069>\
**Category:** Get Help\
**Tags:** kubernetes, galaxy-ng\
**Created:** [April 22, 2024, 3:46pm UTC](https://forum.ansible.com/t/cannot-serve-galaxy-ng-using-relative-path-in-nginx/5069 "2024-04-22T15:46:31Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [April 23, 2024, 1:40pm UTC](https://forum.ansible.com/t/cannot-serve-galaxy-ng-using-relative-path-in-nginx/5069/4 "2024-04-23T13:40:57Z")

</div>

I’m going to first make the same recommendation that @kurokobo did.

> [@How to persist galaxy-ng data in a k8s environment?](http://forum.ansible.com/t/how-to-persist-galaxy-ng-data-in-a-k8s-environment/5070/4):
>
> Indeed it is technically possible, but a bit hard way. Even if you want to do so, first of all, I recommend you to deploy Galaxy NG by using Galaxy Operator to know what the designed setup is, where the PVCs are mounted on which pods, how configuration files for Nginx are designed, etc…

Deploying from the operator will help you see how the configuration should look in k8s to begin with.

Then you can scale down the operator, and modify the config file manually and roll the pods to pick up changes.

You’ll need to set:

```python
GALAXY_API_PATH_PREFIX = '/galaxy-ng/api/galaxy'
CONTENT_PATH_PREFIX = '/galaxy-ng/api/galaxy/pulp/api/v3/artifacts/collections/'
API_ROOT = '/galaxy-ng/api/galaxy/pulp/'
STATIC_ROOT = '/galaxy-ng/app/galaxy_ng/app/static/'

```

The above is not an exhaustive list, but the point is you will need to set every URI path related setting to account for the fact you’re placing everything under `http://<ip_address>/galaxy-ng`

You may also need to account for things like:  
`ANSIBLE_API_HOSTNAME, CONTENT_ORIGIN, CORS_ORIGIN_WHITELIST, CSRF_TRUSTED_ORIGINS, TOKEN_SERVER` among other things

That being said, I haven’t seen a `/ui/` specific path setting, so I’m not sure that the UI itself even supports relative paths.

---

_[View the full topic](https://forum.ansible.com/t/cannot-serve-galaxy-ng-using-relative-path-in-nginx/5069)._
