Trying host multiple gunicorn servers on the same domain

Viewed 16

I have a Ubuntu server onto I want to host few webservers on the same domain. My project is to have a "portfolio" website to host all my small projects I do to learn web dev, and for the moment all the back-end is is done in Flask.

I have done what's requested by Mark Stosberg on running two instances of gunicorn like this :

/etc/systemd/system/gunicorn@.service :

[Unit]
Description=gunicorn daemon
After=network.target
PartOf=gunicorn.target
# Since systemd 235 reloading target can pass through
ReloadPropagatedFrom=gunicorn.target


[Service]
User=ubuntu
Group=www-data
WorkingDirectory=/home/clement/webapps/%i

ExecStart=/home/clement/webapps/%i/venv/bin/gunicorn unix:/home/clement/webapps/%i/kb.sock wsgi:app

[Install]
WantedBy=gunicorn.target

I have made a clone of a flask app I made in a folder named ascii for simplicity, I started all Gunicorn instances with systemctl start gunicorn.target , then added the new instance like this systemctl enable gunicorn@ascii.

But, when I go to the address of the server in my browser, or with the domain name I bought, all I can see is the Apache2 Ubuntu Default Page.

Maybe I misunderstand what I should do, or maybe it's actually not possible, but anyway, I someone know how to solve this issue, or a simpler way to do this, I'm listening !

Thanks.

0 Answers
Related