jjmontesl / cubesviewer

Explore and visualize analytical datasets
http://www.cubesviewer.com
Other
441 stars 112 forks source link

CubesViewer with Apache #84

Closed aabadi closed 5 years ago

aabadi commented 8 years ago

Hi! Mav be somebody can help me. Im trying to run CubesViewer Server under the Apache Web Server.

For that reason I created the following file as a host for the apache conf dir.

Alias /media/ /opt/web/cubesviewer-server/cvapp/cubesviewer/media/
Alias /static/ /opt/web/cubesviewer-server/cvapp/cubesviewer/static/

<Directory /opt/web/cubesviewer-server/cvapp/cubesviewer/static>
        Require all granted
</Directory>

<Directory /opt/web/cubesviewer-server/cvapp/cubesviewer/media>
        Require all granted
</Directory>

WSGIScriptAlias / /opt/web/cubesviewer-server/cvapp/cvapp/wsgi.py
WSGIPythonPath /opt/web/cubesviewer-server/cvapp

<Directory /opt/web/cubesviewer-server/cvapp>
Require all granted
<Files wsgi.py>
Require all granted
</Files>
</Directory>

With this configuration is working perfectly! The only concern is that it only works if I access on the root URL (http://192.168.1.65/cubesviewer/)...

I would like to run in on http://192.168.1.65/bi/cubesviewer/

If I change the follwing line in the host.conf ... cubesviewer is not working. WSGIScriptAlias /bi/ /opt/web/cubesviewer-server/cvapp/cvapp/wsgi.py.

Do I have to change something on Settings.py ??

Thks in advance for the help

jjmontesl commented 8 years ago

You possibly need to update the STATIC_URL parameter in settings.py (and restart the Apache server and reload in browser).

If this doesn't help, please describe the particular error you are observing.

aabadi commented 8 years ago

Is not working either.

Changing the STATIC_URL, will only change for Static files (CSS, JavaScript, Images)

Wont affect the Apache.

jjmontesl commented 8 years ago

What error(s) do you see? Check your browser console and network tabs, to see which (if any) requests are returning "Not Found", or some other error.

aabadi commented 8 years ago

The errors that we found is the following:

If I leave on apache conf the line: WSGIScriptAlias / /opt/web/cubesviewer-server/cvapp/cvapp/wsgi.py

CubeViewer will only work on the root, will not allow me to do what I wanted, to run in on http://192.168.1.65/bi/cubesviewer/

If I change WSGIScriptAlias / to WSGIScriptAlias /bi/ AND change the settings.py (STATIC_URL) it will also NOT work. If I try to access http://192.168.1.65/bi/cubesviewer/ I received a [Page not found (404)] image

jjmontesl commented 8 years ago

The configuration looks ok to me. Are you sure you restarted Apache after changing to WSGIScriptAlias /bi? Also, try using /bi instead of /bi/.

jjmontesl commented 8 years ago

Also, if restarting Apache doesn't help, maybe try changing current domain to "yourdomain.tld/bi" in the "sites" framework.

Check this SO answer: http://stackoverflow.com/questions/1466708/run-django-with-url-prefix-subdirectory-app-works-but-urls-broken