how i can configure cherokee 1.2 server with uWSGI and web2py? after some googling I read some tutor about configure, but the cherokee version in that tutors are too old. is there any new tutorial or can somebody ste-by-step explain how to deploy web2py app in cherokee?
my system is Ubuntu 12.04, all dependents were installed, uWSGI was installed and cherokee too. my web2py folder located in /var/web2py with config.xml in it for uWSGI params. config.xml content is:
<uwsgi>
<pythonpath>/var/web2py/</pythonpath>
<app mountpoint="/">
<script>wsgihandler</script>
</app>
You can find a thoroughgoing description of just this type of setup in the book "web2py Application Development Cookbook." Here's the config.xml given in the text:
<uwsgi>
<pythonpath>/var/web2py</pythonpath>
<module>wsgihandler</module>
<socket>127.0.0.1:37719</socket>
<master/>
<processes>8</processes>
<memory-report/>
</uwsgi>
After that's in place, you're instructed to run the uWSGI stack as the user who owns the web2py installation:
$ uWSGI -d config.xml
According to the recipe provided in the book, you then launch cherokee-admin and configure the server via the webui (it should be listening on port 9090). They walk you through the setup of a remote host using the info in your config.xml file, creating a virtual host and then giving it a handler. There's also info on using a regex facility to serve static files.
Related
After creating a new lightsail django instance on AWS, I found that the folders /opt/bitnami/apps/ does not exist as referenced in the documentation https://aws.amazon.com/getting-started/hands-on/deploy-python-application/. I've created django instances before on AWS and have never encountered this issue.
bitnami#ip-172-26-4-185:~$ ls
bitnami_application_password bitnami_credentials htdocs stack
bitnami#ip-172-26-4-185:~$ cd /
bitnami#ip-172-26-4-185:/$ cd opt
bitnami#ip-172-26-4-185:/opt$ cd bitnami
bitnami#ip-172-26-4-185:/opt/bitnami$ cd apps
-bash: cd: apps: No such file or directory
bitnami#ip-172-26-4-185:/opt/bitnami$ ls
apache bncert-tool bnsupport-tool git nami properties.ini stats
apache2 bnsupport common gonit node python var
bncert bnsupport-regex.ini ctlscript.sh mariadb postgresql scripts
Additional info:
16 GB RAM, 4 vCPUs, 320 GB SSD
Django
Virginia, Zone A (us-east-1a)
attached static ip address
Bitnami Engineer here,
The apps folder doesn't exist anymore in the Django solution. The guide you are following is not maintained by Bitnami and that's why it's not up to date. To create a new project in the new Bitnami Django solution, you will need to run these commands
sudo mkdir -p /opt/bitnami/projects/PROJECT
sudo chown $USER /opt/bitnami/projects
django-admin startproject PROJECT /opt/bitnami/projects/PROJECT
cd /opt/bitnami/projects/PROJECT
python manage.py migrate
python manage.py startapp helloworld
python manage.py runserver
and access the port 8000 to see that new hello world project.
You can learn more about this in our official documentation
https://docs.bitnami.com/aws/infrastructure/django/get-started/start-django-project/
https://docs.bitnami.com/aws/infrastructure/django/get-started/deploy-django-project/
Thanks
I've gone through the same problem (the directories aren't created by the blueprint) and asked it in AWS Developer Forum.
The user donleyataws pointed to Bitnami's documentation and the first thing it tells is to create the projects directory and its ownership.
First, create a new folder to store your Django projects, such as the /opt/bitnami/projects directory, and give write permissions for the current system user. Assuming your in bitnami folder (the one with bitnami_application_password bitnami_credentials htdocs stack), then run
sudo mkdir projects
sudo chown $USER projects
I'm trying to use mod_wsgi-express for a django project. This project will be served through the main instance of apache, with a proxy. My purpose is to serve a python 3 application with a mod_wsgi for python 2 installed on the "main" apache server. (I've many apps on the same server)
I've created a systemd service which should launch the mod_wsgi-express instance, using my own service file :
https://gist.github.com/frague59/87529fc28b098dd116f09be92cf66af0
and
https://gist.github.com/frague59/8de1d03800042db95c82452af280dffe
I've to mention that those scripts works on another server, same distro, same version (debian oldstable)
... but the mod_wsgi-express does not start : no error message, no log...
I've noticed that a dir is created in tmp:
/tmp/mod_wsgi-127.0.0.1:8081:993
I've tried to start the apachectl from here:
# apachectl configtest
And I have a weird message:
AH00526: Syntax error on line 241 of /tmp/mod_wsgi-127.0.0.1:8081:993/httpd.conf:
Invalid option to WSGI daemon process definition.
I posts the generated httpd.conf file for example:
https://gist.github.com/frague59/a6d8d26b704565b39f7352a7c16e07d3
Error seems to be around:
send-buffer-size=0 \
I want to setup a Galaxy instance in my server running on CentOS and I have an issue with configuring my Apache server with uWSGI. I have installed uwsgi with pip:
pip install uwsgi
and added in my Apache configuration file the following lines:
<Location "/galaxy">
Sethandler uwsgi-handler
uWSGISocket 127.0.0.1:4001
uWSGImaxVars 512
</Location>
as instructed by the Galaxy team. Nevertheless when I restart my web server I get the following error:
Invalid command 'uWSGISocket', perhaps misspelled or defined by a mod
and it fails to start again.
I'm very new to using Apache for proxying requests so I need any help I can get.
Thank you in advance.
Recently I rented a web server at a certain company. I have ssh access but no root privileges. They don't excpect users to actually use ssh the main way of deploying is ftp or some cms/clickibunti. The OS if FreeBSD and they have a Python installation(2.7.8).
I downloaded virtualenv, Django and gunicorn (installed in the home directory and the virtualenv). I deployed the bootstrap Django app with the development server on 0.0.0.0:8000 which works fine. They deleted pkg and ports (packagemanagers) so I build nginx from source (installed into the /home/myuser/urs/local/bin/).
Now I'm stuck.
How do I deploy nginx without root access? Is this possible? I only have (write)access to /home/myuser/.
Disclaimer: They have a cash return policy so I'm not too concerned. But I have some free time and this seems like a nice problem to master.
Install it into your home directory, and change the config so it uses a port higher than 1024:
$ ./configure --prefix=/home/steve/nginx
$ make && make install
$ cd ~/nginx
$ vi conf/nginx.conf
Change:
server {
listen 80;
to:
server {
listen 8080;
Then start it:
$ ./sbin/nginx
$ netstat -na | grep 8080
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
I'm attempting to setup a generic Pyramid project to work with uWSGI through Cherokee, but constantly get a "no app loaded" error. All the research I've done doesn't really give me much to go on. Anyone have any ideas? Please note that I 'am' using a virtualenv via virtualenvwrapper.
This is from my development.ini
[uwsgi]
socket = 127.0.0.1:2626
master = true
processes = 1
virtualenv = /home/user/.virtualenvs/pyramid/
pythonpath = /home/user/Projects/ConventionMeStatic
And this is the command I've been trying to use to launch it: /usr/bin/uwsgi --ini development.ini --plugin python.
I can post any further details but there have been no other changes made to the project itself.
You have specified a virtualenv and a pytonpath, but you have not specified which app to load.
If you have a single-file app you can load that file with the --wsgi-file option, if you have a deployment.ini file you can use the --paste option as described here
http://projects.unbit.it/uwsgi/wiki/UsePaste
or the --ini-paste shortcuts described in examples section of the uwsgi wiki