Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing to Apache #163

Open
toddmo opened this issue Sep 24, 2022 · 4 comments
Open

Installing to Apache #163

toddmo opened this issue Sep 24, 2022 · 4 comments

Comments

@toddmo
Copy link

toddmo commented Sep 24, 2022

I'm sure this question is beyond the scope of this project itself, but what would be the general approach to integrating my (working) Mathics core/Django installation to a local Apache web server running on the same machine? Perhaps all Python apps are integrated into Apache in roughly the same way, perhaps not.

My motivation is that now I have Mathics running OK locally,

  1. there's a terminal window open and Mathics depends on it staying open
  2. it won't restart when my machine restarts

I would prefer it just be running in the background so that when I go to the url, it just works, just like any other website.

If I end up pushing this to Apache, perhaps I could put those integration files into a pull request. And it could just be an optional part of setup.

@toddmo
Copy link
Author

toddmo commented Sep 24, 2022

An update

I got it fully installed to my shared Linux hosting account, (which is cloud linux not Apache, but has cPanel and is easier to administer), and ran mathicsserver from ssh, successfully; however, once again, it's running from inside a ssh window, and it seems to be hard-coded to listen to port 8000

I need to marry the mathics server to a python web application that I have defined on my hosting provider. This needs to map it to a url path on my server and requests will come in on 443 not 8000. the command "mathicsserver" can be part of the startup code for the web application.

@mmatera
Copy link
Contributor

mmatera commented Sep 25, 2022

Use the option -p 443
mathicsserver -p 443

@toddmo
Copy link
Author

toddmo commented Sep 25, 2022

I need a general clue as to how to route traffic at mywebserver.com/myapppath to/from mathicsserver. Mathics is its own standalone webserver, but I'm putting it on another hosted web server. If it was just a bunch of py files i might be able to take the mathics Web server py file and adapt it by removing the http server and connecting it to the hosting web service instead. But it's compiled and very complicated. So i need to do something with tunneling or routing or redirecting or something.

@mmatera
Copy link
Contributor

mmatera commented Sep 25, 2022

MathicsServer is a Django server, so maybe this could be helpful: https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/modwsgi/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants