Hi,

You shouldn't use the runserver command in production  - THAT is bad. There
are several reasons for this, see here:
https://docs.djangoproject.com/en/2.0/ref/django-admin/#runserver.

The main reasons are that there are no security checks, it reloads if
changes are made in the code and it is not as fast as a production server.

You should use some other type of uwsgi server to serve your code in
production (mod_wsgi, gunicorn or uwsgi for example) and connect them to a
webserver - see here for a setup example:
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Deployment
.

You can then run several uwsgi servers on one server of course.

Regards,

Andréas

2018-01-17 8:43 GMT+01:00 <cherngyo...@gmail.com>:

> wait, i configure the manage.py by inserting this
>
> # Override default port for `runserver` command
> from django.core.management.commands.runserver import Command as runserver
>
> runserver.default_port = "8001"
>
>
> Is this bad ?
>
> On Tuesday, January 16, 2018 at 8:29:44 PM UTC+9, Jason wrote:
>>
>> you need to configure your server to handle that pass through from web
>> request to django.  With apache + mod_wsgi, it would be defined as a
>> virtualhost in the conf files.  Nginx and gunicorn would be done in nginx
>> configuration.
>>
>> You could set it up such that
>>
>> http://companyname.com/django-app-1/path/to/resource
>> http://companyname.com/django-app-2/path/to/resource
>>
>> where /path/to/resource could be identical but would actually hit
>> different projects deployed based in the django-app-[1,2] bit in the URL.
>>
>> AVOID USING DEVSERVER FOR ANYTHING IN PRODUCTION
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/96d392d5-a3db-4d33-9e4f-5318402038a6%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/96d392d5-a3db-4d33-9e4f-5318402038a6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCeX7RJbOG6d8jbrQbP%3DoFMyPaugEq%2B_mDHR08QwzPa4og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to