How to use Apache to serve Django server and React client? -


i'm trying configure apache2 serve django backend apis (/api/), , react app client side js (/).

i want root path load react app (e.g. www.example.com/).

i'm having hard time. if alias/documentroot / react's /build directory, apache stops serving django. , conversely when remove alias/documentroot, django serves fine react doesn't. how this?

here's httpd.conf file:

```

documentroot /home/ubuntu/project/webapp/build/ alias / /home/ubuntu/project/webapp/build/ <directory /home/ubuntu/project/webapp/build>     require granted </directory>  alias /static /home/ubuntu/project/webapp/build/static <directory /home/ubuntu/project/webapp/build/static>     require granted </directory>  wsgidaemonprocess server python-home=/home/ubuntu/python3.5/ python-path=/home/ubuntu/project/server wsgiprocessgroup server wsgiscriptalias /admin /home/ubuntu/project/server/server/wsgi.py  <directory /home/ubuntu/project/server/server> <files wsgi.py>     require granted </files> </directory> 

```

i think it's other way, did refer ? https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -