{"action":"created","issue":{"url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/341","repository_url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi","labels_url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/341/labels{/name}","comments_url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/341/comments","events_url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/341/events","html_url":"https://github.com/GrahamDumpleton/mod_wsgi/issues/341","id":340578468,"node_id":"MDU6SXNzdWUzNDA1Nzg0Njg=","number":341,"title":"Virtual environment and mod_wsgi on different servers","user":{"login":"arshanvit","id":10270194,"node_id":"MDQ6VXNlcjEwMjcwMTk0","avatar_url":"https://avatars3.githubusercontent.com/u/10270194?v=4","gravatar_id":"","url":"https://api.github.com/users/arshanvit","html_url":"https://github.com/arshanvit","followers_url":"https://api.github.com/users/arshanvit/followers","following_url":"https://api.github.com/users/arshanvit/following{/other_user}","gists_url":"https://api.github.com/users/arshanvit/gists{/gist_id}","starred_url":"https://api.github.com/users/arshanvit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arshanvit/subscriptions","organizations_url":"https://api.github.com/users/arshanvit/orgs","repos_url":"https://api.github.com/users/arshanvit/repos","events_url":"https://api.github.com/users/arshanvit/events{/privacy}","received_events_url":"https://api.github.com/users/arshanvit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-12T10:24:07Z","updated_at":"2018-07-12T22:32:32Z","closed_at":null,"author_association":"NONE","body":"Its not an issue but i am clueless as to how to proceed so asked here.I have apache `httpd `installed on server `10.37.45.89` which is having `wsgi_module` installed in it.I have placed my `wsgi.conf` file under `/etc/apache2/conf.d` location having details as following:\r\n\r\n```\r\n<virtualhost *:80>\r\n    ServerName my.webtool\r\n\r\n    WSGIDaemonProcess webtool user=www-data group=www-data threads=5 home=/home/user/flask-dev\r\n    WSGIScriptAlias / /home/user/flask-dev/webtool.wsgi\r\n\r\n    <directory /home/user/flask-dev>\r\n        WSGIProcessGroup webtool\r\n        WSGIApplicationGroup %{GLOBAL}\r\n        WSGIScriptReloading On\r\n        Order deny,allow\r\n        Allow from all\r\n    </directory>\r\n</virtualhost>\r\n\r\n```\r\nI have `Flask `installed on another server  `10.37.45.90` in which i have first set up virtualenv in following manner\r\n\r\n```\r\n(user@ajdfhklfhasjdf01 [~/flask-dev]) sudo pip install virtualenv\r\n(user@ajdfhklfhasjdf01 [~/flask-dev]) sudo virtualenv venv\r\n(user@ajdfhklfhasjdf01 [~/flask-dev]) source venv/bin/activate\r\n(venv)(user@ajdfhklfhasjdf01 [~/flask-dev])\r\n(venv)(user@ajdfhklfhasjdf01 [~/flask-dev]) sudo pip install Flask\r\n```\r\n\r\nI have following hierarchy of my code and wsgi file:\r\n\r\n```\r\n(venv)(user@ajdfhklfhasjdf01 [~/flask-dev])$ ls\r\n__init__.py*  webtool.wsgi*\r\n\r\n(venv)(user@ajdfhklfhasjdf01 [~/flask-dev])$ cat webtool.wsgi\r\nimport sys\r\nsys.path.append('/home/user/flask-dev')\r\nfrom webtool import app as application\r\n\r\n(venv)(user@ajdfhklfhasjdf01 [~/flask-dev])$ cat __init__.py\r\nimport socket\r\nfrom flask import Flask\r\napp = Flask(__name__)\r\nhost_ip_address = socket.gethostbyname(socket.gethostname())\r\n@app.route(\"/\")\r\ndef hello():\r\n    return \"Hello world!\"\r\nif __name__ == \"__main__\":\r\n    app.run(debug=True,host=host_ip_address,port=30004\r\n\r\n(venv)(user@ajdfhklfhasjdf01 [~/flask-dev])$ ls\r\n__init__.py*  webtool.wsgi*\r\n\r\n(venv)(user@ajdfhklfhasjdf01 [~/flask-dev])$ cat webtool.wsgi\r\nimport sys\r\nsys.path.append('/home/user/flask-dev')\r\nfrom webtool import app as application\r\n\r\n(venv)(user@ajdfhklfhasjdf01 [~/flask-dev])$ cat __init__.py\r\nimport socket\r\nfrom flask import Flask\r\napp = Flask(__name__)\r\nhost_ip_address = socket.gethostbyname(socket.gethostname())\r\n@app.route(\"/\")\r\ndef hello():\r\n    return \"Hello world!\"\r\nif __name__ == \"__main__\":\r\n    app.run(debug=True,host=host_ip_address,port=30004)\r\n```\r\n\r\nWhar actually should i mention in `wsgi.conf` file so that it is able to access it.Kindly help"},"comment":{"url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/comments/404671208","html_url":"https://github.com/GrahamDumpleton/mod_wsgi/issues/341#issuecomment-404671208","issue_url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/341","id":404671208,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDY3MTIwOA==","user":{"login":"GrahamDumpleton","id":507637,"node_id":"MDQ6VXNlcjUwNzYzNw==","avatar_url":"https://avatars2.githubusercontent.com/u/507637?v=4","gravatar_id":"","url":"https://api.github.com/users/GrahamDumpleton","html_url":"https://github.com/GrahamDumpleton","followers_url":"https://api.github.com/users/GrahamDumpleton/followers","following_url":"https://api.github.com/users/GrahamDumpleton/following{/other_user}","gists_url":"https://api.github.com/users/GrahamDumpleton/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamDumpleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamDumpleton/subscriptions","organizations_url":"https://api.github.com/users/GrahamDumpleton/orgs","repos_url":"https://api.github.com/users/GrahamDumpleton/repos","events_url":"https://api.github.com/users/GrahamDumpleton/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamDumpleton/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T22:32:31Z","updated_at":"2018-07-12T22:32:31Z","author_association":"OWNER","body":"Your Python virtual environment, application code, and Apache/mod_wsgi need to be on the same machine.\r\n\r\nIf you can do that, then look at using the Apache as a proxy only, and run ``mod_wsgi-express`` on the second machine where virtual environment and code is, and have Apache proxy to that."}}
{"actor":{"display_login":"GrahamDumpleton"}}