Hello
My web runs well following the tutorial on how to setup Django gunicorn, systemd and as we know, there is a line in the nginx file that reads like this:
proxy_pass http://unix:/run/gunicorn.sock;
However, the issue that I am anticipating while reading the tutorial on how to install pgadmin4 on server mode is that in there it says that we need to add this line
location / {
proxy_pass http://unix:/tmp/pgadmin4.sock;
include proxy_params;
}
which, as we see, either conflicts (or replaces or does it just add one more? ) to the first one cited above.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Heya,
Instead of putting both inside location / {}
, define separate paths for each service:
server {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass http://unix:/run/gunicorn.sock;
include proxy_params;
}
location /pgadmin4/ {
proxy_pass http://unix:/tmp/pgadmin4.sock;
include proxy_params;
}
}
/
(the root path) go to your Django app./pgadmin4/
go to pgAdmin.Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.