Moving Django site with Gunicorn to a new user on Ubuntu 16.04Setting up Django and Posgtresql on ubuntu“Unit gunicorn.service failed to load: No such file or directory” on Ubuntu 15.10?403 forbidden for django + gunicorn + systemd + apache?Ubuntu 16.04 - keep an x86_64 application runningWhat is the proper way to install ZooKeeper on Ubuntu 16.04 for both standalone and multi-node deployment?Systemd runs start and stop commands simultaneously on Ubuntu 18.04 - Minecraft server issues
I just compiled bitcoind and run for the first time. Do I already have a private key?
Is the "spacetime" the same thing as the mathematical 4th dimension?
Can anyone give me the reason why music is taught this way?
How to level a picture frame hung on a single nail?
Would a horse be sufficient buffer to prevent injury when falling from a great height?
Can a passenger predict that an airline or a tour operator is about to go bankrupt?
How dangerous is a very out-of-true disc brake wheel?
Do jackscrews suffer from blowdown?
Can the President of the US limit First Amendment rights?
Can an untrusted VPN client monitor my network activity?
Why such a singular place for bird watching?
Realistically, how much do you need to start investing?
Replace zeros in a list with last nonzero value
Disable all sound permanently
Why does it seem the best way to make a living is to invest in real estate?
Can UK supreme court justices be evaluated ideologically?
Caro-Kann c4-c5 push
Principled construction of the quaternions
Meaning of "fin" in "fin dai tempi"
How dangerous are my worn rims?
Why aren't faces sharp in my f/1.8 portraits even though I'm carefully using center-point autofocus?
Why do personal finance apps focus on outgoings rather than income
How to transcribe an arpeggiated 4-note chord to be playable on a violin?
Avoiding dust scattering when you drill
Moving Django site with Gunicorn to a new user on Ubuntu 16.04
Setting up Django and Posgtresql on ubuntu“Unit gunicorn.service failed to load: No such file or directory” on Ubuntu 15.10?403 forbidden for django + gunicorn + systemd + apache?Ubuntu 16.04 - keep an x86_64 application runningWhat is the proper way to install ZooKeeper on Ubuntu 16.04 for both standalone and multi-node deployment?Systemd runs start and stop commands simultaneously on Ubuntu 18.04 - Minecraft server issues
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I was handed a broken Django server for the 2019 high school cyber defense competition, and I am having a bit of trouble moving it out of the root directory to prevent red team from executing scripts through Django as root.
What I have tried:
I tried just moving it to my safer Admin folder (I am thinking about making a user with no sudo access and dropping it there i'd also love an opinion on whether that would work) I just did the mv /dir /home/myUser/Django
to try and move it. I then entered the venv environment and tried to start it with python3 manage.py runserver 0.0.0.0:80
but it kept giving an error in the manage.py file. So I checked it out and it was pointing to a parenthesis which is odd.
Then I remebered that there was a systemd service for the sole purpose of keeping the server running. So I stopped it, and then changed the path and reloaded the daemon and started it back up. It said active and running but that also didn't work. From what I can tell the systemd service was starting it through Gunicorn which is something I have never used.
My final questions:
Are there any steps I missed? What do I need to do to make this all work? Does Gunicorn complicate this or add any more steps?
server python webserver webapps django
add a comment
|
I was handed a broken Django server for the 2019 high school cyber defense competition, and I am having a bit of trouble moving it out of the root directory to prevent red team from executing scripts through Django as root.
What I have tried:
I tried just moving it to my safer Admin folder (I am thinking about making a user with no sudo access and dropping it there i'd also love an opinion on whether that would work) I just did the mv /dir /home/myUser/Django
to try and move it. I then entered the venv environment and tried to start it with python3 manage.py runserver 0.0.0.0:80
but it kept giving an error in the manage.py file. So I checked it out and it was pointing to a parenthesis which is odd.
Then I remebered that there was a systemd service for the sole purpose of keeping the server running. So I stopped it, and then changed the path and reloaded the daemon and started it back up. It said active and running but that also didn't work. From what I can tell the systemd service was starting it through Gunicorn which is something I have never used.
My final questions:
Are there any steps I missed? What do I need to do to make this all work? Does Gunicorn complicate this or add any more steps?
server python webserver webapps django
add a comment
|
I was handed a broken Django server for the 2019 high school cyber defense competition, and I am having a bit of trouble moving it out of the root directory to prevent red team from executing scripts through Django as root.
What I have tried:
I tried just moving it to my safer Admin folder (I am thinking about making a user with no sudo access and dropping it there i'd also love an opinion on whether that would work) I just did the mv /dir /home/myUser/Django
to try and move it. I then entered the venv environment and tried to start it with python3 manage.py runserver 0.0.0.0:80
but it kept giving an error in the manage.py file. So I checked it out and it was pointing to a parenthesis which is odd.
Then I remebered that there was a systemd service for the sole purpose of keeping the server running. So I stopped it, and then changed the path and reloaded the daemon and started it back up. It said active and running but that also didn't work. From what I can tell the systemd service was starting it through Gunicorn which is something I have never used.
My final questions:
Are there any steps I missed? What do I need to do to make this all work? Does Gunicorn complicate this or add any more steps?
server python webserver webapps django
I was handed a broken Django server for the 2019 high school cyber defense competition, and I am having a bit of trouble moving it out of the root directory to prevent red team from executing scripts through Django as root.
What I have tried:
I tried just moving it to my safer Admin folder (I am thinking about making a user with no sudo access and dropping it there i'd also love an opinion on whether that would work) I just did the mv /dir /home/myUser/Django
to try and move it. I then entered the venv environment and tried to start it with python3 manage.py runserver 0.0.0.0:80
but it kept giving an error in the manage.py file. So I checked it out and it was pointing to a parenthesis which is odd.
Then I remebered that there was a systemd service for the sole purpose of keeping the server running. So I stopped it, and then changed the path and reloaded the daemon and started it back up. It said active and running but that also didn't work. From what I can tell the systemd service was starting it through Gunicorn which is something I have never used.
My final questions:
Are there any steps I missed? What do I need to do to make this all work? Does Gunicorn complicate this or add any more steps?
server python webserver webapps django
server python webserver webapps django
edited Apr 16 at 13:33
Hunter
asked Apr 15 at 23:18
HunterHunter
63 bronze badges
63 bronze badges
add a comment
|
add a comment
|
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1134210%2fmoving-django-site-with-gunicorn-to-a-new-user-on-ubuntu-16-04%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1134210%2fmoving-django-site-with-gunicorn-to-a-new-user-on-ubuntu-16-04%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown