Re: Django deploy Apache

2022-05-18 Thread Kasper Laudrup

On 13/05/2022 13.56, Nicolas Passarini wrote:
Hello, i ve deployed a django app in apache. the problem is that i works 
for 5 minutes and then it stops responding.




That sucks. Sounds like you have some issues you need to look into.

Good luck.

Kind regards,
Kasper Laudrup



--
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 
<mailto:django-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/84858a53-2256-4bee-889a-ff365127f86en%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/84858a53-2256-4bee-889a-ff365127f86en%40googlegroups.com?utm_medium=email_source=footer>.


--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/21b9a5fd-873e-503b-5f87-d67e60ce2faf%40stacktrace.dk.


OpenPGP_0xE5D9CAC64AAA55EB.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Django deploy Apache

2022-05-13 Thread Nicolas Passarini
Hello, i ve deployed a django app in apache. the problem is that i works 
for 5 minutes and then it stops responding. 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/84858a53-2256-4bee-889a-ff365127f86en%40googlegroups.com.


Re: IS it possible to debug Django with Apache and mod_wsgi

2021-02-13 Thread yashwanth .k
Hello Ognjen Bjelica,
I think we can check for line by line using manage.py -> shell. Where we
have to individually import and check for consistency.

On Fri, Feb 12, 2021 at 11:24 PM Ognjen Bjelica 
wrote:

> Hi Rob,
> Thanks for the quick reply, but I was looking for a way to run code line
> by line. Because DEBUG=True is useful only in some situations.
>
>
> On Fri, Feb 12, 2021, 17:19 Rob Wilkinson 
> wrote:
>
>> Sorry meant DEBUG=True   :)
>>
>> On Fri, Feb 12, 2021 at 10:39 AM Rob Wilkinson <
>> wilkyconsulta...@gmail.com> wrote:
>>
>>>
>>> DEBUG=Yes in settings.py shows what you need even in Apache
>>>
>>> Don’t run like that in prod!
>>>
>>>
>>> On Fri, Feb 12, 2021 at 10:36 AM Ognjen B. 
>>> wrote:
>>>
>>>> Hi everyone,
>>>> I was wondering can anyone point me to a document describing how to
>>>> setup debugging using any IDE (VS Code, PyCharm, etc) or at least from
>>>> console when using Django with Apache and mod_wsgi? Or if it's not possible
>>>> please let me know so I don't waste any more time.
>>>>
>>>> Thanks
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/4ccfa917-06b4-4182-a76d-7b1a4c41eff5n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/4ccfa917-06b4-4182-a76d-7b1a4c41eff5n%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/XXq-_CJwSh4/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAAdSEeZLJLMSUBHAgNaBG4CZYF%2B%3D1tcqTPDYAr06-jJvBRSOmA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAAdSEeZLJLMSUBHAgNaBG4CZYF%2B%3D1tcqTPDYAr06-jJvBRSOmA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAOW%2BycFVYZw0uCwPNrLz93sUCMthP-2cp1CrtPe7YqhiYAomMA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAOW%2BycFVYZw0uCwPNrLz93sUCMthP-2cp1CrtPe7YqhiYAomMA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALgTQAKhJYai0tLjZ3PtgJA%2BgB%3DfMcnLu2DMiERqMJLAqtguXA%40mail.gmail.com.


Re: IS it possible to debug Django with Apache and mod_wsgi

2021-02-12 Thread Ognjen Bjelica
Hi Rob,
Thanks for the quick reply, but I was looking for a way to run code line by
line. Because DEBUG=True is useful only in some situations.


On Fri, Feb 12, 2021, 17:19 Rob Wilkinson 
wrote:

> Sorry meant DEBUG=True   :)
>
> On Fri, Feb 12, 2021 at 10:39 AM Rob Wilkinson 
> wrote:
>
>>
>> DEBUG=Yes in settings.py shows what you need even in Apache
>>
>> Don’t run like that in prod!
>>
>>
>> On Fri, Feb 12, 2021 at 10:36 AM Ognjen B. 
>> wrote:
>>
>>> Hi everyone,
>>> I was wondering can anyone point me to a document describing how to
>>> setup debugging using any IDE (VS Code, PyCharm, etc) or at least from
>>> console when using Django with Apache and mod_wsgi? Or if it's not possible
>>> please let me know so I don't waste any more time.
>>>
>>> Thanks
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/4ccfa917-06b4-4182-a76d-7b1a4c41eff5n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/4ccfa917-06b4-4182-a76d-7b1a4c41eff5n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/XXq-_CJwSh4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAAdSEeZLJLMSUBHAgNaBG4CZYF%2B%3D1tcqTPDYAr06-jJvBRSOmA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAAdSEeZLJLMSUBHAgNaBG4CZYF%2B%3D1tcqTPDYAr06-jJvBRSOmA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOW%2BycFVYZw0uCwPNrLz93sUCMthP-2cp1CrtPe7YqhiYAomMA%40mail.gmail.com.


Re: IS it possible to debug Django with Apache and mod_wsgi

2021-02-12 Thread Rob Wilkinson
DEBUG=Yes in settings.py shows what you need even in Apache

Don’t run like that in prod!


On Fri, Feb 12, 2021 at 10:36 AM Ognjen B.  wrote:

> Hi everyone,
> I was wondering can anyone point me to a document describing how to setup
> debugging using any IDE (VS Code, PyCharm, etc) or at least from console
> when using Django with Apache and mod_wsgi? Or if it's not possible please
> let me know so I don't waste any more time.
>
> Thanks
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4ccfa917-06b4-4182-a76d-7b1a4c41eff5n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/4ccfa917-06b4-4182-a76d-7b1a4c41eff5n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAdSEeYk4R9xSRuMfnB%2B1PfY46gmJoyeGgG8CNz6WvL-skKo%2BA%40mail.gmail.com.


Re: IS it possible to debug Django with Apache and mod_wsgi

2021-02-12 Thread Rob Wilkinson
Sorry meant DEBUG=True   :)

On Fri, Feb 12, 2021 at 10:39 AM Rob Wilkinson 
wrote:

>
> DEBUG=Yes in settings.py shows what you need even in Apache
>
> Don’t run like that in prod!
>
>
> On Fri, Feb 12, 2021 at 10:36 AM Ognjen B. 
> wrote:
>
>> Hi everyone,
>> I was wondering can anyone point me to a document describing how to setup
>> debugging using any IDE (VS Code, PyCharm, etc) or at least from console
>> when using Django with Apache and mod_wsgi? Or if it's not possible please
>> let me know so I don't waste any more time.
>>
>> Thanks
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/4ccfa917-06b4-4182-a76d-7b1a4c41eff5n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/4ccfa917-06b4-4182-a76d-7b1a4c41eff5n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAdSEeZLJLMSUBHAgNaBG4CZYF%2B%3D1tcqTPDYAr06-jJvBRSOmA%40mail.gmail.com.


IS it possible to debug Django with Apache and mod_wsgi

2021-02-12 Thread Ognjen B.
Hi everyone,
I was wondering can anyone point me to a document describing how to setup 
debugging using any IDE (VS Code, PyCharm, etc) or at least from console 
when using Django with Apache and mod_wsgi? Or if it's not possible please 
let me know so I don't waste any more time.

Thanks

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4ccfa917-06b4-4182-a76d-7b1a4c41eff5n%40googlegroups.com.


Re: is that any way to deploy django in apache with centos

2019-06-01 Thread Ryan Nowakowski
Please post the specific error you're getting.

On May 30, 2019 6:59:22 AM CDT, Kurosh Sol  wrote:
>is that any way to set Django in apache with wsgi mod  in centos
>I keep reading and still get error 
>any good resource can really work?
>
>-- 
>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/d041c339-201f-420b-a2b1-849016ae0b7a%40googlegroups.com.
>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/ED256938-23CE-467B-A2B7-91F64A9D7425%40fattuba.com.
For more options, visit https://groups.google.com/d/optout.


Re: is that any way to deploy django in apache with centos

2019-05-30 Thread Suresh Kannan
Hi,

I found this video helpful
https://www.youtube.com/watch?v=DzXCHAuHf0I=1553s but with Nginx and
Uwsgi.

Hope this helps you!

Suresh

On Thu, May 30, 2019 at 7:59 AM Kurosh Sol  wrote:

> is that any way to set Django in apache with wsgi mod  in centos
> I keep reading and still get error
> any good resource can really work?
>
> --
> 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/d041c339-201f-420b-a2b1-849016ae0b7a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/d041c339-201f-420b-a2b1-849016ae0b7a%40googlegroups.com?utm_medium=email_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/CANfVfcDo-vh6VHnoUSGDbr64pTxzbzSD_f1Lm_9GPTWKMf0hhA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


is that any way to deploy django in apache with centos

2019-05-30 Thread Kurosh Sol
is that any way to set Django in apache with wsgi mod  in centos
I keep reading and still get error 
any good resource can really work?

-- 
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/d041c339-201f-420b-a2b1-849016ae0b7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django wsgi apache Deploy project

2019-05-30 Thread N'BE SORO
 thank you everyone I managed the deployment

Le mar. 7 mai 2019 à 18:48, Subhodeep Das  a
écrit :

> Try:
>
> WSGIScriptAlias /test/tc-test /var/www/stage/hello/tc-test/django.wsgi
>
> You shouldn't have trailing slash on first argument.
>
> On Tue, May 7, 2019 at 7:27 PM N'BE SORO  wrote:
>
>>
>> Hi I'm a beginner in python and I realized a project in Django. I have
>> problems in hosting my project. here is my code in the 000-default.conf
>>  #ServerName #ServerAlias ServerAdmin webmaster @
>> localhost DocumentRoot / var / www / html / ecommerce WSGIScriptAlias ​​/
>> /var/www/html/ecommerce/ecommerce/wsgi.py WSGIPythonPath / var / www / html
>> / ecommerce / ErrorLog $ {APACHE_LOG_DIR} /error.log CustomLog $
>> {APACHE_LOG_DIR} /access.log combined  and I have this error
>> Invalid command 'WSGIScriptAlias / /var / www / html / ecommerce /
>> ecommerce / wsgi.py ', perhaps misspelled or d efined by a module not
>> included in the server configuration
>>
>> --
>> 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/1912bcdc-cb2f-45a2-932c-d579eb944c0a%40googlegroups.com
>> 
>> .
>> 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/CAJEaip7ZtWWZW--O9Z2nqvVypwLe8CMRVSPboc28yoNkaLMV%3Dg%40mail.gmail.com
> 
> .
> 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/CAOtSHp--MqaZPhUZiPUgBdBEMp%2B2F0Mm_uQHJ%2But1_qHh75d4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django wsgi apache Deploy project

2019-05-07 Thread Subhodeep Das
Try:

WSGIScriptAlias /test/tc-test /var/www/stage/hello/tc-test/django.wsgi

You shouldn't have trailing slash on first argument.

On Tue, May 7, 2019 at 7:27 PM N'BE SORO  wrote:

>
> Hi I'm a beginner in python and I realized a project in Django. I have
> problems in hosting my project. here is my code in the 000-default.conf
>  #ServerName #ServerAlias ServerAdmin webmaster @
> localhost DocumentRoot / var / www / html / ecommerce WSGIScriptAlias ​​/
> /var/www/html/ecommerce/ecommerce/wsgi.py WSGIPythonPath / var / www / html
> / ecommerce / ErrorLog $ {APACHE_LOG_DIR} /error.log CustomLog $
> {APACHE_LOG_DIR} /access.log combined  and I have this error
> Invalid command 'WSGIScriptAlias / /var / www / html / ecommerce /
> ecommerce / wsgi.py ', perhaps misspelled or d efined by a module not
> included in the server configuration
>
> --
> 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/1912bcdc-cb2f-45a2-932c-d579eb944c0a%40googlegroups.com
> 
> .
> 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/CAJEaip7ZtWWZW--O9Z2nqvVypwLe8CMRVSPboc28yoNkaLMV%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django wsgi apache Deploy project

2019-05-07 Thread Kevin Jay
Remove the spaces in the paths:
WSGIPythonPath / var / www / html / ecommerce /
should be
WSGIPythonPath  /var/www/html/ecommerce/

Do the same for the other paths

On Tue, May 7, 2019 at 8:57 AM N'BE SORO  wrote:

>
> Hi I'm a beginner in python and I realized a project in Django. I have
> problems in hosting my project. here is my code in the 000-default.conf
>  #ServerName #ServerAlias ServerAdmin webmaster @
> localhost DocumentRoot / var / www / html / ecommerce WSGIScriptAlias ​​/
> /var/www/html/ecommerce/ecommerce/wsgi.py WSGIPythonPath / var / www / html
> / ecommerce / ErrorLog $ {APACHE_LOG_DIR} /error.log CustomLog $
> {APACHE_LOG_DIR} /access.log combined  and I have this error
> Invalid command 'WSGIScriptAlias / /var / www / html / ecommerce /
> ecommerce / wsgi.py ', perhaps misspelled or d efined by a module not
> included in the server configuration
>
> --
> 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/1912bcdc-cb2f-45a2-932c-d579eb944c0a%40googlegroups.com
> 
> .
> 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/CAEtabwdEQtikBmkrpvpFLJ0oHY%3DfWJhSm5VLGBU7yxwYWq_b2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django wsgi apache Deploy project

2019-05-07 Thread N'BE SORO

Hi I'm a beginner in python and I realized a project in Django. I have 
problems in hosting my project. here is my code in the 000-default.conf 
 #ServerName #ServerAlias ServerAdmin webmaster @ 
localhost DocumentRoot / var / www / html / ecommerce WSGIScriptAlias ​​/ 
/var/www/html/ecommerce/ecommerce/wsgi.py WSGIPythonPath / var / www / html 
/ ecommerce / ErrorLog $ {APACHE_LOG_DIR} /error.log CustomLog $ 
{APACHE_LOG_DIR} /access.log combined  and I have this error 
Invalid command 'WSGIScriptAlias / /var / www / html / ecommerce / 
ecommerce / wsgi.py ', perhaps misspelled or d efined by a module not 
included in the server configuration

-- 
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/1912bcdc-cb2f-45a2-932c-d579eb944c0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Deploy Django with Apache on Windows

2018-11-13 Thread ANi
Hi, 
I come across a problem when I want to deploy Django using Apache on 
Windows.

I separated some configurations into production.py and local.py, like 
database configurations.
And each files will read the actual setting data from a another file 
config.json.

I try to set the environment variables through the following files: 
 1. activate.bat  file of my virtual environment.
( This works only in local)

set "DJANGO_CONFIG=path\to\config.json"
set "DJANGO_SETTINGS_MODULE=myapp.settings.production"

 2. httpd.conf in Apache.
(env_module is enabled.)

LoadModule wsgi_module "path/to/mod_wsgi.cp37-win32.pyd"


WSGIScriptAlias / "path/to/wsgi.py"
WSGIPythonHome "path/to/virtualenv"
WSGIPythonPath "path/to/myproject"


SetEnv DJANGO_SETTINGS_MODULE "myapp.settings.production"
SetEnv DJANGO_CONFIG "path/to/config.json"


Alias /static "path/to/static-files"

 Require all granted





 Require all granted




The only way is to set the variables in wsgi.py, but this is not what I 
want.

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings.production')
os.environ.setdefault('DJANGO_CONFIG', 'path\to\config.json')

Please tell me if you need more information and thank you for helping.



-- 
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/ea0d1d61-f6b8-40f0-affe-61e78ddd41ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django windows apache tell if apache is working

2018-07-03 Thread Bob Bobsled
Hi,
I think I see the problem now.

WAMP is a special case for aliases, and it's root directory default setup
in c:wamp\www for ex..  I need to do some more work on, say for ex. using
Django Tut 01, setting up mysite as an alias in wamp, and then putting the
polls app in it.  I believe apache might start to work then with django if
the wamp alias is setup correctly.

I also found this vid tut:  really good, but for XAMPP, not WAMP...but it
shows how to get the mod_wsgi.so from a renamed and extracted .whl file.
And using the mod_wsgi.so with apache simplifies things a bit, so this is
good too.

XAMPP
This shows how to create a mod_wsgi.so from the .pyd extracted from the
.whl file
https://www.youtube.com/watch?v=VnR5O4IjmOs

Regards


On Sat, Jun 30, 2018 at 10:08 AM, Jason  wrote:

> I meant the tutorial at https://docs.djangoproject.
> com/en/2.0/intro/tutorial01/
>
> That said, there's a few different ways you can actually deploy, but
> digitalocean has some good resources for starting out.
>
> https://www.digitalocean.com/community/tutorials/how-to-
> serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04
>
> This one shows how to use apache on ubuntu, and you should be able to
> extrapolate to use wamp.
>
> what I would do is just set up a simple view to return a http response
> saying "working", and map that to the root.  Something like
>
> app/views
>
> def index(request):
> return HttpResponse("Working!")
>
> app/urls
>
> from app.views import index
> urlpatterns = [
> path('', index),
> ]
>
> and hit localhost.  That'll be all you need.
>
> Hi,
>> Thanks.
>> Yes, I went thru the Mozilla library tutorial on a fedora dev machine to
>> the point where I realized I needed to do more with the last mile, so to
>> speak working on setup of the production server part on Windows and wamp.
>> Seems most tuts end at manage.py runserver, or start into deployment from
>> dev to production.  I can't seem to locate a good uptodate tut for wamp
>> that shows how to test everything is working properly in a simple manner
>> for the wsgi part.
>>
>> I'm just trying to verify the plumbing (httpd.conf, settings.py wsgi.py)
>> is working with apache, before spending too much more time building a site.
>>
>>
>> On Sat, Jun 30, 2018 at 2:54 AM, Jason  wrote:
>>
>>> appreciate the detailed report :-)
>>>
>>> so, have you set up the django tutorial project?  that application
>>> method in wsgi doesn't make any sense.  you should have urls and views set
>>> up in your project
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/django-users/-eJaLuJ85KE/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django-users...@googlegroups.com.
>>> To post to this group, send email to django...@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/ms
>>> gid/django-users/6d241c04-55be-4524-959e-09630a7bc21f%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/6d241c04-55be-4524-959e-09630a7bc21f%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/django-users/-eJaLuJ85KE/unsubscribe.
> To unsubscribe from this group and all its topics, 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/6f5e5996-a85e-4eb6-b5e4-804f7379a2b4%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/6f5e5996-a85e-4eb6-b5e4-804f7379a2b4%40googlegroups.com?utm_medium=email_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/CALWZDaNY4miqCqxy%3DLvH4417%3DP4XGOuHAOepCBT2tPpg0wqkrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django windows apache tell if apache is working

2018-07-02 Thread Bob Bobsled
Hi,
I'm still stuck on getting Apache to verify as working with wsgi.
Wondering what I might be doing incorrectly.
I'm reading lots of tuts, but it's a jungle out there.

I changed the folder hierarchy for the project and app so
venv, django_project, and  django_app are all on the same level as manage.py
thus:
c:/wamp/www-src/django_project
c:/wamp/www-src/django_app
c:/wamp/www-src/venev
c:/wamp/www-src/manage.py

In wamp create folder named www-src alongside the www folder.
cd into www-src.

created a virtual environment:
Inside www-src run > virtualenv venv

ACTIVATE and DEACTIVATE:

then activate by
> venv\Scripts\activate

if that works see (venv) as a prefix to the command line.  To deactivate
type:
>venv\Scripts\deactivate.bat.
...or can also just use
(venv) c:\wamp\www-src >deactivate
-

DJANGO PROJECT, APP, and VENV:
Then with the virtual environment active, install Django with the local
instance of pip by typing: >pip install django

then created a new django project >python django-admin.py startproject
django_project

and on the same level as manage.py type
>django-admin.py startapp django_app

Should have django_app folder, django_project folder, venv folder, and
manage.py all on the same level.

SETUP SQLITE DATABASE:

in the top level folder (the one with manage.py in it), type this in:
> python manage.py migrate


START RUNSERVER:
> python manage.py runserver

see success...so far.
-
Trying to get Apache production server working...

SETUP STATIC files location:

in settings.py

SETTINGS.PY:

in settings.py change STATIC_URL to:

STATIC_URL = os.path.join(BASE_DIR, "static/")

...also set
STATIC_ROOT = os.path.join(BASE_DIR, "static/")

then run
>(venv) c:\wamp\www-src>manage.py collectstatic

(should see new static dir under www-src)
---

MIGRATIONS:

then from c:\wamp\www-src run
(venv) c:\wamp\www-src >manage.py makemigrations
then
(venv) c:\wamp\www-src >manage.py migrate

SETTINGS.PY

in settings.py change STATIC_URL to:

STATIC_URL = os.path.join(BASE_DIR, "static/")

...also set
STATIC_ROOT = os.path.join(BASE_DIR, "static/")

then run
>(venv) c:\wamp\www-src>manage.py collectstatic

(should see new static dir under www-src)
--
...per Jason's suggestion for simple view and url...

in DJANGO_APP/VIEWS.PY

def index(request):
return HttpResponse("Working!")

--
in DJANGO_APP/URLS.PY

from django_app.views import index
urlpatterns = [
path('', index),
]

-
APACHE HTTPD.CONF

#---mod_wgi-express config for location in python ---
LoadFile
"c:/users/administrator/appdata/local/programs/python/python36-32/python36.dll"
LoadModule wsgi_module
"c:/users/administrator/appdata/local/programs/python/python36-32/lib/site-packages/mod_wsgi/server/mod_wsgi.cp36-win32.pyd"

WSGIPythonHome
"c:/users/administrator/appdata/local/programs/python/python36-32"
WSGIScriptAlias /django-project "C:/wamp/www-src/django_project/wsgi.py"
#WSGIPythonPath
"C:/wamp/www-src/django_project/:C:/wamp/www-src/venv/Lib/site-packages"
WSGIPythonPath "C:/wamp/www-src:C:/wamp/www-src/venv/Lib/site-packages"



Order deny,allow
Require all granted




APACHE HTTPD-VHOSTS.CONF


ServerName localhost
ServerAlias localhost
DocumentRoot c:/wamp/www

Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
#Require local
Require all granted




Alias /static c:/wamp/www-src/static

Require all granted



---

restart APACHE

...but what is the correct URL to test here?

tried localhost:8000 all pointing to various folders but nothing connects
so far.



On Sat, Jun 30, 2018 at 10:08 AM, Jason  wrote:

> I meant the tutorial at https://docs.djangoproject.
> com/en/2.0/intro/tutorial01/
>
> That said, there's a few different ways you can actually deploy, but
> digitalocean has some good resources for starting out.
>
> https://www.digitalocean.com/community/tutorials/how-to-
> serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04
>
> This one shows how to use apache on ubuntu, and you should be able to
> extrapolate to use wamp.
>
> what I would do is just set up a simple view to return a http response
> saying "working", and map that to the root.  Something like
>
> app/views
>
> def index(request):
> return HttpResponse("Working!")
>
> app/urls
>
> from app.views import index
> urlpatterns = [
> path('', index),
> ]
>
> and hit localhost.  That'll be all you need.
>
> Hi,
>> Thanks.
>> Yes, I went thru the Mozilla library tutorial on a fedora dev machine to
>> the point

Re: django windows apache tell if apache is working

2018-06-30 Thread Jason
I meant the tutorial at 
https://docs.djangoproject.com/en/2.0/intro/tutorial01/

That said, there's a few different ways you can actually deploy, but 
digitalocean has some good resources for starting out.

https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04

This one shows how to use apache on ubuntu, and you should be able to 
extrapolate to use wamp.

what I would do is just set up a simple view to return a http response 
saying "working", and map that to the root.  Something like 

app/views

def index(request):
return HttpResponse("Working!")

app/urls

from app.views import index
urlpatterns = [
path('', index), 
]

and hit localhost.  That'll be all you need.

Hi,
> Thanks.
> Yes, I went thru the Mozilla library tutorial on a fedora dev machine to 
> the point where I realized I needed to do more with the last mile, so to 
> speak working on setup of the production server part on Windows and wamp.
> Seems most tuts end at manage.py runserver, or start into deployment from 
> dev to production.  I can't seem to locate a good uptodate tut for wamp 
> that shows how to test everything is working properly in a simple manner 
> for the wsgi part.
>
> I'm just trying to verify the plumbing (httpd.conf, settings.py wsgi.py) 
> is working with apache, before spending too much more time building a site. 
>  
>
> On Sat, Jun 30, 2018 at 2:54 AM, Jason > 
> wrote:
>
>> appreciate the detailed report :-)
>>
>> so, have you set up the django tutorial project?  that application method 
>> in wsgi doesn't make any sense.  you should have urls and views set up in 
>> your project
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/-eJaLuJ85KE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> django-users...@googlegroups.com .
>> To post to this group, send email to django...@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/6d241c04-55be-4524-959e-09630a7bc21f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/6d241c04-55be-4524-959e-09630a7bc21f%40googlegroups.com?utm_medium=email_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/6f5e5996-a85e-4eb6-b5e4-804f7379a2b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django windows apache tell if apache is working

2018-06-30 Thread Bob Bobsled
Hi,
Thanks.
Yes, I went thru the Mozilla library tutorial on a fedora dev machine to
the point where I realized I needed to do more with the last mile, so to
speak working on setup of the production server part on Windows and wamp.
Seems most tuts end at manage.py runserver, or start into deployment from
dev to production.  I can't seem to locate a good uptodate tut for wamp
that shows how to test everything is working properly in a simple manner
for the wsgi part.

I'm just trying to verify the plumbing (httpd.conf, settings.py wsgi.py) is
working with apache, before spending too much more time building a site.

On Sat, Jun 30, 2018 at 2:54 AM, Jason  wrote:

> appreciate the detailed report :-)
>
> so, have you set up the django tutorial project?  that application method
> in wsgi doesn't make any sense.  you should have urls and views set up in
> your project
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/django-users/-eJaLuJ85KE/unsubscribe.
> To unsubscribe from this group and all its topics, 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/6d241c04-55be-4524-959e-09630a7bc21f%40googlegroups.com
> 
> .
>
> 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/CALWZDaPoCygU8hSSYcsEpQnHGE%2B52EUxAyOko3kPRhR12t6HCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django windows apache tell if apache is working

2018-06-30 Thread Jason
appreciate the detailed report :-)

so, have you set up the django tutorial project?  that application method 
in wsgi doesn't make any sense.  you should have urls and views set up in 
your project

-- 
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/6d241c04-55be-4524-959e-09630a7bc21f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django windows apache tell if apache is working

2018-06-29 Thread thebobbobsled

Hi,

I'm new to this group, and also new to Python, and Django.  Seems like lots 
of good info for django on this group.

Sorry for long, detailed descriptions, below, but I am stuck trying to 
verify wamp, apache and django are working as a production server on a 
Windows 7, 32-bit machine.

I am hung on last mile part (way below), or how to see something in the 
browser using apache, not the dev runserver.  The dev server seems to work 
fine at this point showing default django startup page.

I'm not sure how to proceed with verifying apache is working as a 
production server.  If all is working, should apache show the same Python 
default start page as the dev server?  Or what simple web pages should I 
implement to verify the apache connection is actually working on the server?

Wamp is also working fine with it's own www directory and local webpages 
etc. using apache.


Wampserver 3.0.6 32bit, with apache2.4.23
---
PYTHON AND APACHE:

Python 3.6.5 32bit, with Django 2.0.6

Tried following Eastwood description for Django setup for Wamp
https://ericeastwood.com/blog/3/django-setup-for-wamp
---
MOD_WSGI:

Could not pip install mod_wsgi, and needed to download VisualStudio build 
tools and upgrade framework to 4.7.1.

Downloaded mod_wsgi-4.5.24+ap24vc14-cp36-cp36m-win32.whl
https://www.lfd.uci.edu/~gohlke/pythonlibs/
to work with apache 2.4.23, VC++14, and python3.6

then did >> pip install 
C:\Users\Administrator\Downloads\mod_wsgi-4.5.24+ap24vc14-cp36-cp36m-win32.whl. 
 
Did not get mod_wsgi.so in apache modules folder, but did get a .pyd in: 
c:/users/administrator/appdata/local/programs/python/python36-32/lib/site-packages/mod_wsgi/server/mod_wsgi.cp36-win32.pyd

Could then run mod_wsgi-express.

>From cmd prompt in apache bin dir used >httpd -t -D DUMP_MODULES to show 
wsgi_module (shared) is present.
---
VIRTUALENV:

Per Eastwood description (above), inside c:/wamp created a new directory 
www-src next to www which is where our other wamp sites are located. Inside 
c:\wamp\www-src ran >virtualenv django_project, then 
django_project\Scripts\activate.  See (django_project) as prefix to cmd 
prompt. With virtual environment active did >pip install django.  Then 
(django_project_ c:\wamp\www-src > django-admin.py startproject 
django_project .  to setup up project in current or www-src directory.

c:\wamp\www-src\django_project
c:\wamp\www-src\static
c:\wamp\www-src\db.sqlite3
c:\wamp\www-src\manage.py

and in c:\wamp\www-src\django_project have settings.py, urls.py, and 
wsgi.py, etc.
---
SETTINGS.PY

in settings.py change STATIC_URL to:

STATIC_ROOT = 'C:/wamp/www-src/static'
STATIC_URL = 'http://XXXmyipXXX/static/'


also added localhost, and my local IP to ALLOWED_HOSTS in settings.py
---
MIGRATIONS:

then from c:\wamp\www-src run
(django_project) c:\wamp\www-src >manage.py makemigrations
then
(django_project) c:\wamp\www-src >manage.py migrate

also ran >(django_project) c:\wamp\www-src >manage.py collectstatic
although static dir is empty at this point.
---
DEVELOPMENT SERVER:

(django_project) c:\wamp\www-src >manage.py runserver 0.0.0.0:8000

>From the browser > http://localhost:8000 this initially caused windows 
firewall error to appear but an exception was added to allow it to continue.

Can see python default page, and also localhost:8000\admin too on Dev 
server.  Dev server can be seen by other machines on the network too.

CONFIGURE APACHE:
for production server using wamp instead of dev server.

using mod_wsgi-express settings in httpd.conf.
Apache httpd.conf is in:
C:\wamp\bin\apache\apache2.4.23\conf\httpd.conf

Apache httpd-vhosts.conf is in:
C:\wamp\bin\apache\apache2.4.23\conf\extra\httpd-vhosts.conf

added to httpd.conf:
LoadFile 
"c:/users/administrator/appdata/local/programs/python/python36-32/python36.dll"
LoadModule wsgi_module 
"c:/users/administrator/appdata/local/programs/python/python36-32/lib/site-packages/mod_wsgi/server/mod_wsgi.cp36-win32.pyd"

WSGIPythonHome 
"c:/users/administrator/appdata/local/programs/python/python36-32"
WSGIScriptAlias /django-project 
"C:/wamp/www-src/django_project/wsgi.py:C:/wamp/www-src/django_project/wsgi_app.py"
WSGIPythonPath 
"C:/wamp/www-src/django_project/:C:/wamp/www-src/django_project/Lib/site-packages"



Order deny,allow
Require all granted


Order deny,allow
Require all granted




added to httpd-vhosts.conf:

Alias /static c:/wamp/www-src/static

Require all granted



...restarted apache


CONFUSED FROM HERE...or last mile to verify production server can run 
django from virtual environment.

If try localhost:8000 in browser see ERR_CONNECTION_REFUSED.
If try localhost/wsgi and have wsgi_app.py in django_project, see requested 
URL not found.

wsgi_app.py

de

Re: Django with apache and php

2017-11-30 Thread Jason
you'll need to set up a virtual conf file.  
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/modwsgi/ has 
good directions.

You can have it run on the same port, just set the URL path differently to 
point to django.  Eg, using the Alias directive 



-- 
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/81437d8c-ea33-4eb8-8ca8-83f0e21cf4f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django with apache and php

2017-11-30 Thread Julián Melero Hidalgo

Hi all.I'm new in Django. I have a question.I have a server with apache and php. I would like to use django in this server.How can I config django in apache?Can I use django in the same port that php projects? How?Thank you a lot!Julián Melero.
 



-- 
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/331141966.241230.1512039364335%40email.1and1.es.
For more options, visit https://groups.google.com/d/optout.


how to run popen in django with apache? help~

2017-10-19 Thread Wu, Pei
Hi Django

I googled web two days, not find a solution yet, so I mail to group.

Here is my post, I want to use popen to run a simple command to copy file to s3.
https://stackoverflow.com/questions/46814197/how-to-run-popen-in-django-with-apache-help

The problem is apache, if Django use apache, the code seems doesn't run(without 
apache, it works fine), anyone has idea? Thank you!



Pei

-- 
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/BLUPR10MB0769EA0A9441D6C3A0FF4166E2420%40BLUPR10MB0769.namprd10.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django deployement Apache

2017-10-19 Thread sarfaraz ahmed
Thanks you all you friends.. this is been fixed.


On Thursday, 31 August 2017 14:47:05 UTC+5:30, Antonis Christofides wrote:
>
> Did you run collectstatic? After you do so, the files will be copied to 
> /var/www/static_root or whatever your STATIC_ROOT points to.
>
> Some other notes:
>
>- You normally don't need to touch STATICFILES_DIRS at all. 
>- The value os.path.join(os.path.dirname(BASE_DIR), 'static_root') is 
>a bad idea for production. On development it may be OK, but in production 
>you'd better specify the full path, such as '/var/www/static_root'. 
>- You don't need to specify both "Alias /static/admin" and "Alias 
>/static". Just the second one will do. "Alias /static 
> /var/www/static_root" 
>and that's it. 
>
> Regards,
>
> Antonis
>
> Antonis Christofideshttp://djangodeployment.com
>
> On 2017-08-30 21:58, sarfaraz ahmed wrote:
>
> Thanks Antonis,
>
> I reached your website googling undoubtedly this is well explained. I have 
> been able to deploy but here is my problem
>
> STATIC_URL = '/static/'
> MEDIA_URL = '/media/'
>
>
> STATICFILES_DIRS = [os.path.join(BASE_DIR, 
> "static"),os.path.join(BASE_DIR,"static","admin")]
> STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR),'static_root')
> MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR),'media_root')
>
> This is my settings in settingss.py 
>
> Here is my vhost.conf files
>
> WSGIPythonHome /usr/local/lib/python2.7/dist-packages
>
>
> WSGIPythonPath /var/www/firsttest
>
> 
> ServerName firsttest.com
> ServerAlias www.firsttest.com
> ServerAdmin webmaster@localhost
>
> WSGIScriptAlias / /var/www/firsttest/firsttest/wsgi.py
>
> ErrorLog   /var/log/apache2/firsttest/first_error.log
> CustomLog   /var/log/apache2/firsttest/first_access.log combined
> Alias */static/admin /var/www/firsttest/static/admin*
> 
> Require all granted
> 
>
> Alias /static  */var/www/firsttest/static*
> 
> Require all granted
> 
>
> 
> 
> Require all granted
> 
> 
> 
>
> Now with this conf file everything works fine. CSS, js all works fine. 
> However, you notice the conf file marked in red. its not actually pointing 
> to my static_root folder which in settings defined as 
> /var/www/static_root
>
> static root is one which gathers all my static files when I run collect 
> static
>
> if I understand correctly from documentation. Web server should point to 
> static root folder to access css files in production. 
>
> Regards,
> Sarfaraz Ahmed
>
>
>  
>
> On Wednesday, 30 August 2017 13:44:35 UTC+5:30, Antonis Christofides 
> wrote: 
>>
>> Hello Sarfaraz,
>>
>> You could try "How Django static files work in production 
>> "
>>  
>> to get some understanding of the correct way to do it.
>>
>> Regards,
>>
>> Antonis
>>
>> Antonis Christofideshttp://djangodeployment.com
>>
>> On 2017-08-28 06:17, sarfaraz ahmed wrote:
>>
>> Thanks for your help. Yes it was permission issue. However I am not able 
>> to find anything under my site-packages. when I point the same to 
>> dist-packages it works. 
>>
>> WSGIPythonHome /usr/local/lib/python2.7/dist-packages
>> WSGIPythonPath /var/www/firsttest
>>
>> 
>> ServerName firsttest.com
>> ServerAlias www.firsttest.com
>> ServerAdmin webmaster@localhost
>>
>> WSGIScriptAlias / /var/www/firsttest/firsttest/wsgi.py
>>
>> ErrorLog   /var/log/apache2/firsttest/first_error.log
>> CustomLog   /var/log/apache2/firsttest/first_access.log combined
>> Alias /static/admin/ 
>> /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/
>> Alias /static/ /var/www/firsttest/static
>> 
>> 
>> Require all granted
>> 
>> 
>> 
>>
>> -
>>
>>
>> This is my new conf file and it works. However I am still not able to see 
>> my static files in admin. Any help would be appreciated.
>>
>>
>> Regards
>> Sarfaraz
>>
>> On Sunday, 27 August 2017 10:57:12 UTC+5:30, Vernon Swanepoel wrote: 
>>>
>>> Hello Sarfaraz, 
>>>
>>> A couple things you could look at:
>>>
>>>1. Are you including both your site-packages (eg 
>>>python3.6/lib/site-packages) and your django project root (where you 
>>>actually built the project) in your WSGIPythonPath?  String them 
>>> together 
>>>with a clone 
>>>(/path/to/python3.6/lib/site-packages:/path/to/django/project/myproject) 
>>>2. Your wsgi is within your django app 
>>>(/path/to/django/project/myproject/myproject/wsgi...).  It sits in the 
>>> same 
>>>file as your settings.py.  Make sure it's pointing to the right place, 
>>>because in your examples above your directory for django and your 

Re: Django deployement Apache

2017-08-30 Thread sarfaraz ahmed
Thanks Antonis,

I reached your website googling undoubtedly this is well explained. I have 
been able to deploy but here is my problem

STATIC_URL = '/static/'
MEDIA_URL = '/media/'


STATICFILES_DIRS = [os.path.join(BASE_DIR, 
"static"),os.path.join(BASE_DIR,"static","admin")]
STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR),'static_root')
MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR),'media_root')

This is my settings in settingss.py 

Here is my vhost.conf files

WSGIPythonHome /usr/local/lib/python2.7/dist-packages


WSGIPythonPath /var/www/firsttest


ServerName firsttest.com
ServerAlias www.firsttest.com
ServerAdmin webmaster@localhost

WSGIScriptAlias / /var/www/firsttest/firsttest/wsgi.py

ErrorLog   /var/log/apache2/firsttest/first_error.log
CustomLog   /var/log/apache2/firsttest/first_access.log combined
Alias */static/admin /var/www/firsttest/static/admin*

Require all granted


Alias /static  */var/www/firsttest/static*

Require all granted




Require all granted




Now with this conf file everything works fine. CSS, js all works fine. 
However, you notice the conf file marked in red. its not actually pointing 
to my static_root folder which in settings defined as 
/var/www/static_root

static root is one which gathers all my static files when I run collect 
static

if I understand correctly from documentation. Web server should point to 
static root folder to access css files in production. 

Regards,
Sarfaraz Ahmed


 

On Wednesday, 30 August 2017 13:44:35 UTC+5:30, Antonis Christofides wrote:
>
> Hello Sarfaraz,
>
> You could try "How Django static files work in production 
> "
>  
> to get some understanding of the correct way to do it.
>
> Regards,
>
> Antonis
>
> Antonis Christofideshttp://djangodeployment.com
>
> On 2017-08-28 06:17, sarfaraz ahmed wrote:
>
> Thanks for your help. Yes it was permission issue. However I am not able 
> to find anything under my site-packages. when I point the same to 
> dist-packages it works. 
>
> WSGIPythonHome /usr/local/lib/python2.7/dist-packages
> WSGIPythonPath /var/www/firsttest
>
> 
> ServerName firsttest.com
> ServerAlias www.firsttest.com
> ServerAdmin webmaster@localhost
>
> WSGIScriptAlias / /var/www/firsttest/firsttest/wsgi.py
>
> ErrorLog   /var/log/apache2/firsttest/first_error.log
> CustomLog   /var/log/apache2/firsttest/first_access.log combined
> Alias /static/admin/ 
> /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/
> Alias /static/ /var/www/firsttest/static
> 
> 
> Require all granted
> 
> 
> 
>
> -
>
>
> This is my new conf file and it works. However I am still not able to see 
> my static files in admin. Any help would be appreciated.
>
>
> Regards
> Sarfaraz
>
> On Sunday, 27 August 2017 10:57:12 UTC+5:30, Vernon Swanepoel wrote: 
>>
>> Hello Sarfaraz, 
>>
>> A couple things you could look at:
>>
>>1. Are you including both your site-packages (eg 
>>python3.6/lib/site-packages) and your django project root (where you 
>>actually built the project) in your WSGIPythonPath?  String them together 
>>with a clone 
>>(/path/to/python3.6/lib/site-packages:/path/to/django/project/myproject) 
>>2. Your wsgi is within your django app 
>>(/path/to/django/project/myproject/myproject/wsgi...).  It sits in the 
>> same 
>>file as your settings.py.  Make sure it's pointing to the right place, 
>>because in your examples above your directory for django and your 
>> directory 
>>for the wsgi don't match. 
>>3. Have you set execute permissions all the way down the django app 
>>(using chmod +x /all/the/way/up/the/django/project/to/wsgi.py) 
>>
>> Deploying the first time is a frustrating process, and it's hard to get 
>> specific help because nobody knows exactly what you've got running, but if 
>> you stick with it, you'll get it working.
>>
>> Regards,
>> Vernon
>>
>> On Saturday, 26 August 2017 21:31:34 UTC+1, sarfaraz ahmed wrote: 
>>>
>>> Hey Team,
>>>
>>> Please someone help.
>>> I am still getting error
>>>
>>> * ImportError: No module named django.core.wsgi *mentioned below is my 
>>> latest vhost file in ubuntu. 
>>>
>>> 
>>> WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py
>>> ServerName firstweb.com
>>>
>>> ServerAlias www.firstweb.com
>>> 
>>> 
>>> Require all granted
>>> 
>>> 
>>> CustomLog /var/log/apache2/firstweb-access.log combined
>>> ErrorLog 

Re: Django deployement Apache

2017-08-30 Thread Antonis Christofides
Hello Sarfaraz,

You could try "How Django static files work in production
"
to get some understanding of the correct way to do it.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 2017-08-28 06:17, sarfaraz ahmed wrote:
> Thanks for your help. Yes it was permission issue. However I am not able to
> find anything under my site-packages. when I point the same to dist-packages
> it works.
>
> WSGIPythonHome /usr/local/lib/python2.7/dist-packages
> WSGIPythonPath /var/www/firsttest
>
> 
>     ServerName firsttest.com
>     ServerAlias www.firsttest.com
>     ServerAdmin webmaster@localhost
>
>     WSGIScriptAlias / /var/www/firsttest/firsttest/wsgi.py
>
>     ErrorLog   /var/log/apache2/firsttest/first_error.log
>     CustomLog   /var/log/apache2/firsttest/first_access.log combined
>     Alias /static/admin/
> /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/
>     Alias /static/ /var/www/firsttest/static
>     
>     
>     Require all granted
>     
>     
> 
> -
>
>
> This is my new conf file and it works. However I am still not able to see my
> static files in admin. Any help would be appreciated.
>
>
> Regards
> Sarfaraz
>
> On Sunday, 27 August 2017 10:57:12 UTC+5:30, Vernon Swanepoel wrote:
>
> Hello Sarfaraz,
>
> A couple things you could look at:
>
>  1. Are you including both your site-packages (eg
> python3.6/lib/site-packages) and your django project root (where you
> actually built the project) in your WSGIPythonPath?  String them
> together with a clone
> 
> (/path/to/python3.6/lib/site-packages:/path/to/django/project/myproject)
>  2. Your wsgi is within your django app
> (/path/to/django/project/myproject/myproject/wsgi...).  It sits in the
> same file as your settings.py.  Make sure it's pointing to the right
> place, because in your examples above your directory for django and
> your directory for the wsgi don't match.
>  3. Have you set execute permissions all the way down the django app
> (using chmod +x /all/the/way/up/the/django/project/to/wsgi.py)
>
> Deploying the first time is a frustrating process, and it's hard to get
> specific help because nobody knows exactly what you've got running, but if
> you stick with it, you'll get it working.
>
> Regards,
> Vernon
>
> On Saturday, 26 August 2017 21:31:34 UTC+1, sarfaraz ahmed wrote:
>
> Hey Team,
>
> Please someone help.
> I am still getting error*ImportError: No module named django.core.wsgi
>
> *mentioned below is my latest vhost file in ubuntu.
>
> 
>     WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py
>     ServerName firstweb.com 
>
>     ServerAlias www.firstweb.com 
>     
>     
>     Require all granted
>     
>     
>     CustomLog /var/log/apache2/firstweb-access.log combined
>     ErrorLog /var/log/apache2/firstweb-error.log
> 
>
> Earlier I missed WSGIScriptAlias argument.
>
> Regards,
> Sarfaraz Ahmed
>
>
>
> On Saturday, 26 August 2017 20:02:47 UTC+5:30, sarfaraz ahmed wrote:
>
> Hello Friends,
>
> Please help me with this.
>
> I am new to linux and I am attempting to deploy my trial app on
> AWS ubuntu server.
>
> my vhost file looks like this
> 
>     WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py
>
>    WSGIPythonPath /var/www/firstweb
>     ServerName firstweb.com 
>
>     ServerAlias www.firstweb.com 
>     
>     
>     Require all granted
>     
>     
> 
>
> now when I add WSGIPythonPath.. my apache fails to restart.
>
> If I remove that that I get following error when I try to access
> this from my computer.
> ImportError: No module named django.core.wsgi
>
> Now, I searched on the web and found following link
> https://www.webforefront.com/django/setupapachewebserverwsgi.html
> 
> 
>  
> which has some solution which I am not able to understand so far.
>
> after wasting my time in attempting to deploy on windows server.
>   

Re: Django deployement Apache

2017-08-29 Thread Daniel Roseman
On Tuesday, 29 August 2017 05:48:57 UTC+1, Vernon Swanepoel wrote:
>
> You can just copy the static files out of Django and into the static files 
> in your project itself.


No. You should absolutely not do that. That is what the `collectstatic` 
command is for.
--
DR. 

-- 
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/d1503e9c-388e-4a2c-92b7-b6e87ae9933a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django deployement Apache

2017-08-28 Thread Vernon Swanepoel
You can just copy the static files out of Django and into the static files in 
your project itself.

-- 
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/d8a9ded1-6956-4293-a355-dc25d16cdca0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django deployement Apache

2017-08-27 Thread sarfaraz ahmed
Thanks for your help. Yes it was permission issue. However I am not able to 
find anything under my site-packages. when I point the same to 
dist-packages it works. 

WSGIPythonHome /usr/local/lib/python2.7/dist-packages
WSGIPythonPath /var/www/firsttest


ServerName firsttest.com
ServerAlias www.firsttest.com
ServerAdmin webmaster@localhost

WSGIScriptAlias / /var/www/firsttest/firsttest/wsgi.py

ErrorLog   /var/log/apache2/firsttest/first_error.log
CustomLog   /var/log/apache2/firsttest/first_access.log combined
Alias /static/admin/ 
/usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/
Alias /static/ /var/www/firsttest/static


Require all granted



-


This is my new conf file and it works. However I am still not able to see 
my static files in admin. Any help would be appreciated.


Regards
Sarfaraz

On Sunday, 27 August 2017 10:57:12 UTC+5:30, Vernon Swanepoel wrote:
>
> Hello Sarfaraz,
>
> A couple things you could look at:
>
>1. Are you including both your site-packages (eg 
>python3.6/lib/site-packages) and your django project root (where you 
>actually built the project) in your WSGIPythonPath?  String them together 
>with a clone 
>(/path/to/python3.6/lib/site-packages:/path/to/django/project/myproject)
>2. Your wsgi is within your django app 
>(/path/to/django/project/myproject/myproject/wsgi...).  It sits in the 
> same 
>file as your settings.py.  Make sure it's pointing to the right place, 
>because in your examples above your directory for django and your 
> directory 
>for the wsgi don't match.
>3. Have you set execute permissions all the way down the django app 
>(using chmod +x /all/the/way/up/the/django/project/to/wsgi.py)
>
> Deploying the first time is a frustrating process, and it's hard to get 
> specific help because nobody knows exactly what you've got running, but if 
> you stick with it, you'll get it working.
>
> Regards,
> Vernon
>
> On Saturday, 26 August 2017 21:31:34 UTC+1, sarfaraz ahmed wrote:
>>
>> Hey Team,
>>
>> Please someone help.
>> I am still getting error
>>
>> * ImportError: No module named django.core.wsgi*mentioned below is my 
>> latest vhost file in ubuntu. 
>>
>> 
>> WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py
>> ServerName firstweb.com
>>
>> ServerAlias www.firstweb.com
>> 
>> 
>> Require all granted
>> 
>> 
>> CustomLog /var/log/apache2/firstweb-access.log combined
>> ErrorLog /var/log/apache2/firstweb-error.log
>> 
>>
>> Earlier I missed WSGIScriptAlias argument.
>>
>> Regards,
>> Sarfaraz Ahmed
>>
>>
>>
>> On Saturday, 26 August 2017 20:02:47 UTC+5:30, sarfaraz ahmed wrote:
>>>
>>> Hello Friends,
>>>
>>> Please help me with this. 
>>>
>>> I am new to linux and I am attempting to deploy my trial app on AWS 
>>> ubuntu server.
>>>
>>> my vhost file looks like this 
>>> 
>>> WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py
>>>
>>> WSGIPythonPath /var/www/firstweb
>>> ServerName firstweb.com
>>>
>>> ServerAlias www.firstweb.com
>>> 
>>> 
>>> Require all granted
>>> 
>>> 
>>> 
>>>
>>> now when I add WSGIPythonPath.. my apache fails to restart. 
>>>
>>> If I remove that that I get following error when I try to access this 
>>> from my computer. 
>>> ImportError: No module named django.core.wsgi
>>>
>>> Now, I searched on the web and found following link
>>> https://www.webforefront.com/django/setupapachewebserverwsgi.html
>>>  
>>> which has some solution which I am not able to understand so far.
>>>
>>> after wasting my time in attempting to deploy on windows server. 
>>> everyone suggested me to deploy on linux.
>>>
>>> I M NOT USING virualenv. 
>>>
>>> Thanks in advance. 
>>>
>>> Regards,
>>> Sarfaraz Ahmed
>>>
>>>
>>>
>>>
>>>

-- 
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/17bd4194-0ad2-495d-9281-e23383c28fa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django deployement Apache

2017-08-26 Thread Vernon Swanepoel
Hello Sarfaraz,

A couple things you could look at:

   1. Are you including both your site-packages (eg 
   python3.6/lib/site-packages) and your django project root (where you 
   actually built the project) in your WSGIPythonPath?  String them together 
   with a clone 
   (/path/to/python3.6/lib/site-packages:/path/to/django/project/myproject)
   2. Your wsgi is within your django app 
   (/path/to/django/project/myproject/myproject/wsgi...).  It sits in the same 
   file as your settings.py.  Make sure it's pointing to the right place, 
   because in your examples above your directory for django and your directory 
   for the wsgi don't match.
   3. Have you set execute permissions all the way down the django app 
   (using chmod +x /all/the/way/up/the/django/project/to/wsgi.py)

Deploying the first time is a frustrating process, and it's hard to get 
specific help because nobody knows exactly what you've got running, but if 
you stick with it, you'll get it working.

Regards,
Vernon

On Saturday, 26 August 2017 21:31:34 UTC+1, sarfaraz ahmed wrote:
>
> Hey Team,
>
> Please someone help.
> I am still getting error
>
> * ImportError: No module named django.core.wsgi*mentioned below is my 
> latest vhost file in ubuntu. 
>
> 
> WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py
> ServerName firstweb.com
>
> ServerAlias www.firstweb.com
> 
> 
> Require all granted
> 
> 
> CustomLog /var/log/apache2/firstweb-access.log combined
> ErrorLog /var/log/apache2/firstweb-error.log
> 
>
> Earlier I missed WSGIScriptAlias argument.
>
> Regards,
> Sarfaraz Ahmed
>
>
>
> On Saturday, 26 August 2017 20:02:47 UTC+5:30, sarfaraz ahmed wrote:
>>
>> Hello Friends,
>>
>> Please help me with this. 
>>
>> I am new to linux and I am attempting to deploy my trial app on AWS 
>> ubuntu server.
>>
>> my vhost file looks like this 
>> 
>> WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py
>>
>> WSGIPythonPath /var/www/firstweb
>> ServerName firstweb.com
>>
>> ServerAlias www.firstweb.com
>> 
>> 
>> Require all granted
>> 
>> 
>> 
>>
>> now when I add WSGIPythonPath.. my apache fails to restart. 
>>
>> If I remove that that I get following error when I try to access this 
>> from my computer. 
>> ImportError: No module named django.core.wsgi
>>
>> Now, I searched on the web and found following link
>> https://www.webforefront.com/django/setupapachewebserverwsgi.html
>>  
>> which has some solution which I am not able to understand so far.
>>
>> after wasting my time in attempting to deploy on windows server. everyone 
>> suggested me to deploy on linux.
>>
>> I M NOT USING virualenv. 
>>
>> Thanks in advance. 
>>
>> Regards,
>> Sarfaraz Ahmed
>>
>>
>>
>>
>>

-- 
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/881927b4-dd3a-4ac5-a249-b13db46d6dd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django deployement Apache

2017-08-26 Thread sarfaraz ahmed
Hey Team,

Please someone help.
I am still getting error

* ImportError: No module named django.core.wsgi*mentioned below is my 
latest vhost file in ubuntu. 


WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py
ServerName firstweb.com

ServerAlias www.firstweb.com


Require all granted


CustomLog /var/log/apache2/firstweb-access.log combined
ErrorLog /var/log/apache2/firstweb-error.log


Earlier I missed WSGIScriptAlias argument.

Regards,
Sarfaraz Ahmed



On Saturday, 26 August 2017 20:02:47 UTC+5:30, sarfaraz ahmed wrote:
>
> Hello Friends,
>
> Please help me with this. 
>
> I am new to linux and I am attempting to deploy my trial app on AWS ubuntu 
> server.
>
> my vhost file looks like this 
> 
> WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py
>
> WSGIPythonPath /var/www/firstweb
> ServerName firstweb.com
>
> ServerAlias www.firstweb.com
> 
> 
> Require all granted
> 
> 
> 
>
> now when I add WSGIPythonPath.. my apache fails to restart. 
>
> If I remove that that I get following error when I try to access this from 
> my computer. 
> ImportError: No module named django.core.wsgi
>
> Now, I searched on the web and found following link
> https://www.webforefront.com/django/setupapachewebserverwsgi.html
>  
> which has some solution which I am not able to understand so far.
>
> after wasting my time in attempting to deploy on windows server. everyone 
> suggested me to deploy on linux.
>
> I M NOT USING virualenv. 
>
> Thanks in advance. 
>
> Regards,
> Sarfaraz Ahmed
>
>
>
>
>

-- 
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/94766b53-7500-4b9a-9a82-fc99f5af3e8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django deployement Apache

2017-08-26 Thread sarfaraz ahmed

i have made following changes in my vhost conf file and now services run. 
Also, I don't see any error. But instead of default django page I get 
default apache page.

Here is my new conf file.
-

ServerName firstweb.com
ServerAlias www.firstweb.com


Require all granted





--

I checked for error. I don't see any error. 

Please help


On Saturday, 26 August 2017 20:02:47 UTC+5:30, sarfaraz ahmed wrote:
>
> Hello Friends,
>
> Please help me with this. 
>
> I am new to linux and I am attempting to deploy my trial app on AWS ubuntu 
> server.
>
> my vhost file looks like this 
> 
> WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py
>
> WSGIPythonPath /var/www/firstweb
> ServerName firstweb.com
>
> ServerAlias www.firstweb.com
> 
> 
> Require all granted
> 
> 
> 
>
> now when I add WSGIPythonPath.. my apache fails to restart. 
>
> If I remove that that I get following error when I try to access this from 
> my computer. 
> ImportError: No module named django.core.wsgi
>
> Now, I searched on the web and found following link
> https://www.webforefront.com/django/setupapachewebserverwsgi.html
>  
> which has some solution which I am not able to understand so far.
>
> after wasting my time in attempting to deploy on windows server. everyone 
> suggested me to deploy on linux.
>
> I M NOT USING virualenv. 
>
> Thanks in advance. 
>
> Regards,
> Sarfaraz Ahmed
>
>
>
>
>

-- 
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/cecafa96-463b-4314-97ce-581ef0e89d82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django deployement Apache

2017-08-26 Thread sarfaraz ahmed
Hello Friends,

Please help me with this. 

I am new to linux and I am attempting to deploy my trial app on AWS ubuntu 
server.

my vhost file looks like this 

WSGIScriptAlias / /var/www/firstweb/firstweb/wsgi.py

WSGIPythonPath /var/www/firstweb
ServerName firstweb.com

ServerAlias www.firstweb.com


Require all granted




now when I add WSGIPythonPath.. my apache fails to restart. 

If I remove that that I get following error when I try to access this from 
my computer. 
ImportError: No module named django.core.wsgi

Now, I searched on the web and found following link
https://www.webforefront.com/django/setupapachewebserverwsgi.html
 
which has some solution which I am not able to understand so far.

after wasting my time in attempting to deploy on windows server. everyone 
suggested me to deploy on linux.

I M NOT USING virualenv. 

Thanks in advance. 

Regards,
Sarfaraz Ahmed




-- 
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/e54887bd-2a1e-4a5a-b2e5-2fea53ab9cad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploy Django on Apache server

2017-08-09 Thread Andréas Kühne
2017-08-09 9:01 GMT+02:00 Akshay Jagirdar <akshay02jagir...@gmail.com>:

> Hi Guys,
>
> Please help me with deployment of Django project on Apache server.
>
> My System environment...
>
> OS   : Fedora 20
> Python : 2.7
> Django : 1.11
> Apache: 2.4
>
> What I know is i have modify httpd.conf file in
> /etc/httpd/conf/httpd.conf, please help me with this.
>
> Thanks,
> Akshay Jagirdar
>
> --
> 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/3fe6114f-f184-4827-b93d-caffcb01fc47%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/3fe6114f-f184-4827-b93d-caffcb01fc47%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

Hi,

Check out:
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/modwsgi/

or:
https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-centos-7

Not specifically for Fedora 20 - but rather good howto.

Regards,

Andréas

-- 
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/CAK4qSCf4ytL8EOTYMbkWESZGswDkD-B-3gNZtgxJds7yZkZRQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Deploy Django on Apache server

2017-08-09 Thread Akshay Jagirdar
Hi Guys,

Please help me with deployment of Django project on Apache server. 

My System environment...

OS   : Fedora 20
Python : 2.7
Django : 1.11
Apache: 2.4

What I know is i have modify httpd.conf file in /etc/httpd/conf/httpd.conf, 
please help me with this.

Thanks,
Akshay Jagirdar

-- 
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/3fe6114f-f184-4827-b93d-caffcb01fc47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to run django under apache on windows 10

2016-11-18 Thread Daniel Roseman
On Friday, 18 November 2016 13:58:41 UTC, bob gailer wrote:
>
> Goal: run django under apache on windows 10. I have tried many things, 
> none of which have worked. Errror messages up to wazoo. Google has not 
> been my friend: I found a lot of articles Everything I read is either 
> oriented to linux and/or assumes knowledge I don't have. 
>
> Example: today I discovered 
> https://docs.djangoproject.com/en/1.10/topics/install/ 
> <https://www.google.com/url?q=https%3A%2F%2Fdocs.djangoproject.com%2Fen%2F1.10%2Ftopics%2Finstall%2F=D=1=AFQjCNGdjUeMbTPv5SMKMIw0FGZMqk1YpA>.
>  
> There is a 
> section titled  "Install Apache and mod_wsgi". Unfortunately it does not 
> tell us how to install either! 
>
> Do you know the best, proper, user-friendly, successful way to get 
> django running under apache on windows 10? 
>
>
How can you have error messages from running Django under Apache if you 
haven't even managed to install Apache yet? 

But the full documentation on setting this up is 
at https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/.
--
DR.

-- 
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/51811247-f8c5-4399-876b-ec34f23070c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to run django under apache on windows 10

2016-11-18 Thread bob gailer
Goal: run django under apache on windows 10. I have tried many things, 
none of which have worked. Errror messages up to wazoo. Google has not 
been my friend: I found a lot of articles Everything I read is either 
oriented to linux and/or assumes knowledge I don't have.


Example: today I discovered 
https://docs.djangoproject.com/en/1.10/topics/install/. There is a 
section titled  "Install Apache and mod_wsgi". Unfortunately it does not 
tell us how to install either!


Do you know the best, proper, user-friendly, successful way to get 
django running under apache on windows 10?


--
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/833d8b08-84a4-8687-2f38-0b8a4914bd78%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django on apache server

2016-08-18 Thread Asad Jibran Ahmed
Not being able to load CSS points to an Apache config issue. Did you setup 
apache so your static root configured to serve files from your static 
folder? Your apache config might be helpful here.

Also, what you have pasted here seems like a warning, so while you should 
fix it, this is probably not the cause of your CSS loading error.

On Thursday, August 18, 2016 at 3:44:14 PM UTC+4, hirok biswas wrote:
>
> while i have configuring django app on apchhe basically it works almost 
> well but shows this error log and css not work
> what can i do now???
> i am using 
> #apache2
> #django 1.9.6
> `
> [Wed Aug 17 14:54:12.747345 2016] [wsgi:error] [pid 17910:tid 
> 139970848413440] 
> /home/hirok/apachetest/venv/lib/python2.7/site-packages/django/template/utils.py:37:
>  
> RemovedInDjango110Warning: You haven't defined a TEMPLATES setting. You 
> must do so before upgrading to Django 1.10. Otherwise Django will be unable 
> to load templates.
> [Wed Aug 17 14:54:12.747414 2016] [wsgi:error] [pid 17910:tid 
> 139970848413440]   "unable to load templates.", RemovedInDjango110Warning)
> [Wed Aug 17 14:54:12.747423 2016] [wsgi:error] [pid 17910:tid 
> 139970848413440] 
> `
>

-- 
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/13c18a07-aedb-4560-b10b-bc21ac54de0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django on apache server

2016-08-18 Thread hirok biswas
while i have configuring django app on apchhe basically it works almost 
well but shows this error log and css not work
what can i do now???
i am using 
#apache2
#django 1.9.6
`
[Wed Aug 17 14:54:12.747345 2016] [wsgi:error] [pid 17910:tid 
139970848413440] 
/home/hirok/apachetest/venv/lib/python2.7/site-packages/django/template/utils.py:37:
 
RemovedInDjango110Warning: You haven't defined a TEMPLATES setting. You 
must do so before upgrading to Django 1.10. Otherwise Django will be unable 
to load templates.
[Wed Aug 17 14:54:12.747414 2016] [wsgi:error] [pid 17910:tid 
139970848413440]   "unable to load templates.", RemovedInDjango110Warning)
[Wed Aug 17 14:54:12.747423 2016] [wsgi:error] [pid 17910:tid 
139970848413440] 
`

-- 
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/c7fca004-2847-4e5e-b7f1-501a54f838c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is it possible to connect django to apache derby as a database?

2015-06-05 Thread Florian Apolloner
If it speaks SQL you can just write your own backend for it, but that is 
probably a bit of work.

On Friday, June 5, 2015 at 2:05:40 PM UTC+1, Uk Jo wrote:
>
> I am a newbie about Django and Python. But I attended the basic lecture of 
> python. So I will implement my web application.
> I want to use apache derby. Is is possible? I am proud of being one of 
> member in this group. Thanks.
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/03f927c2-fada-409a-8b31-5eaff4ce8079%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Is it possible to connect django to apache derby as a database?

2015-06-05 Thread Uk Jo
I am a newbie about Django and Python. But I attended the basic lecture of 
python. So I will implement my web application.
I want to use apache derby. Is is possible? I am proud of being one of 
member in this group. Thanks.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5c3529de-7010-40ed-9ad0-71294c12f14e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-08-18 Thread John Schmitt
I realise I'm late to this conversation, but I had to do this for my own use 
recently except that I used Centos 7 and Python 3.4.

To do this for me I hacked up a bash script and put it on github:

https://github.com/marmalodak/centos_python3_django_setup/blob/master/mkenv3

I compile both Python 3.4 and mod_wsgi 3.4.

Before posting this message, I replaced the name of the project for which I 
used this script to make it generic.  Please consider it a starting point.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20140818213736.GA3988%40mediapc.snapdragonfly.net.
For more options, visit https://groups.google.com/d/optout.


Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-13 Thread Guillem Liarte
Tim,

Yes!

I see now what I was doing wrong; I was setting the path in the Django 
settings.py (as I had found in the documentation), however, OF COURSE, that 
is irrelevant because it could ever get there before mod_wsgi being aware 
of where to look for libraries. Damn!

I was having the right idea, but digging in the wrong direction. Thanks 
again, this puts me back on track :-)

Thanks everybody in this thread, I have learn a lot in the way.

Regards,

Guillem



On Tuesday, 13 May 2014 13:04:00 UTC+2, Timothy W. Cook wrote:
>
> I am not sure where your problem is with locale.  Did you ever accomplish 
> recompiling mod_wsgi for Python 3.3? 
>
> This site http://www.ccdgen.com is Django 1.6, Python 3.3 and Apache 2.2 
> on CentOS 6.5 
>
> I recompiled mod_wsgi as per instructions I found somewhere on the WWW. 
>  Sorry I do not have the link now.  As I recall, there were several 
> additional packages I had to track down and install. 
>
> The Django code is in a User home subdirectory and the 'apache' user in 
> the 'ccdgen' group. 
>
> The relevant sections of httpd.conf are:
> Alias /icons/ "/var/www/icons/"
>
> 
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order allow,deny
> Allow from all
> 
>
> Alias /static/ "/var/www/ccdgen/static/"
>
> 
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order allow,deny
> Allow from all
> 
>
>
>
> and 
>
> WSGIScriptAlias / /home/ccdgen/CCDGEN2/ccdgen/mlhim/wsgi.py
> WSGIPythonPath 
> /home/ccdgen/CCDGEN2/ccdgen/ccdgen:/home/ccdgen/CCDGEN2/ccdgen:/home/ccdgen/CCDGEN2/lib/python3.3/site-packages
> 
>
>  Order allow,deny
>  Allow from all
>
> 
>
>
> Maybe something here will 'stick out' as a solution for you.
>
> HTH,
> Tim
>
>
>
>
>  
>
>
> On Tue, May 13, 2014 at 6:14 AM, Guillem Liarte 
>  > wrote:
>
>> Has anybody being able to solve this problem with the locale in virtual 
>> env?
>>
>> I am stuck with it for the moment.
>>
>> It is just that Centos 6 + Django 1.7 (python3.x ) is a no-go?
>>
>> Thanks.
>>
>> On Wednesday, 7 May 2014 16:33:23 UTC+2, Guillem Liarte wrote:
>>>
>>> Timothy,
>>>
>>> Thanks you, but SELinux here does not seem to be the issue. I tried with 
>>> enforcing/permissive/disabled and the effect is the same.
>>>
>>> I belive the problem to be in the os path in the seetings:
>>>
>>> ---
>>>
>>> import os
>>> BASE_DIR = os.path.dirname(os.path.dirname(__file__))
>>>
>>> ...
>>> ...
>>>
>>>
>>>
>>>
>>>
>>> 
>>> 
>>>  
>>> --
>>>
>>> in wsgi.py :
>>>
>>> 
>>>
>>> import os, sys
>>> sys.path.append('/data/app/guillem-py3-dj17-test/guillem_test/guillem_test')
>>> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "guillem_test.settings")
>>>
>>>
>>> ---
>>>
>>> python -c "import sys; print(sys.path)" 
>>> ['', '/data/app/guillem-py3-dj17-test/lib64/python33.zip', 
>>> '/data/app/guillem-py3-dj17-test/lib64/python3.3', 
>>> '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux', 
>>> '/data/app/guillem
>>> -py3-dj17-test/lib64/python3.3/lib-dynload', 
>>> '/opt/rh/python33/root/usr/lib64/python3.3', 
>>> '/opt/rh/python33/root/usr/lib/python3.3', '/data/app/guillem-py3-dj17-
>>> test/lib/python3.3/site-packa
>>> ges']
>>>
>>>
>>>
>>>
>>> I am reading about the differnces for mod_wsgi from python2.x to 
>>> python3.x but I fail to find clear documentation about how the wsgi.py and  
>>> settings.py should look like in python3.
>>>
>>> On Wednesday, 7 May 2014 00:20:00 UTC+2, Timothy W. Cook wrote:


 On Tue, May 6, 2014 at 7:01 PM, Guillem Liarte <
 guillem...@googlemail.com> wrote:

>
>
> But I still get the locale encoding problem.  Do you guys have any 
> suggestions?
>
> I do not recall the exact error I had with this config (once you 
 corrected those you mentioned) but eventually I had to set:

 $setenforce 0

 to disable SELinux security.  I am sure that there is a way around this 
 but I haven't had a need to fix it yet. 

 HTH,
 Tim
  


 
 Timothy Cook
 LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
 MLHIM http://www.mlhim.org

   -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> 

Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-13 Thread Timothy W. Cook
I am not sure where your problem is with locale.  Did you ever accomplish
recompiling mod_wsgi for Python 3.3?

This site http://www.ccdgen.com is Django 1.6, Python 3.3 and Apache 2.2 on
CentOS 6.5

I recompiled mod_wsgi as per instructions I found somewhere on the WWW.
 Sorry I do not have the link now.  As I recall, there were several
additional packages I had to track down and install.

The Django code is in a User home subdirectory and the 'apache' user in the
'ccdgen' group.

The relevant sections of httpd.conf are:
Alias /icons/ "/var/www/icons/"


Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all


Alias /static/ "/var/www/ccdgen/static/"


Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all




and

WSGIScriptAlias / /home/ccdgen/CCDGEN2/ccdgen/mlhim/wsgi.py
WSGIPythonPath
/home/ccdgen/CCDGEN2/ccdgen/ccdgen:/home/ccdgen/CCDGEN2/ccdgen:/home/ccdgen/CCDGEN2/lib/python3.3/site-packages

   
 Order allow,deny
 Allow from all
   



Maybe something here will 'stick out' as a solution for you.

HTH,
Tim







On Tue, May 13, 2014 at 6:14 AM, Guillem Liarte <
guillem.lia...@googlemail.com> wrote:

> Has anybody being able to solve this problem with the locale in virtual
> env?
>
> I am stuck with it for the moment.
>
> It is just that Centos 6 + Django 1.7 (python3.x ) is a no-go?
>
> Thanks.
>
> On Wednesday, 7 May 2014 16:33:23 UTC+2, Guillem Liarte wrote:
>>
>> Timothy,
>>
>> Thanks you, but SELinux here does not seem to be the issue. I tried with
>> enforcing/permissive/disabled and the effect is the same.
>>
>> I belive the problem to be in the os path in the seetings:
>>
>> ---
>>
>> import os
>> BASE_DIR = os.path.dirname(os.path.dirname(__file__))
>> ...
>> ...
>>
>>
>>
>>
>>
>>
>> --
>>
>> in wsgi.py :
>>
>> 
>>
>> import os, sys
>> sys.path.append('/data/app/guillem-py3-dj17-test/guillem_test/guillem_test')
>> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "guillem_test.settings")
>>
>>
>> ---
>>
>> python -c "import sys; print(sys.path)"
>> ['', '/data/app/guillem-py3-dj17-test/lib64/python33.zip',
>> '/data/app/guillem-py3-dj17-test/lib64/python3.3',
>> '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux',
>> '/data/app/guillem
>> -py3-dj17-test/lib64/python3.3/lib-dynload', 
>> '/opt/rh/python33/root/usr/lib64/python3.3',
>> '/opt/rh/python33/root/usr/lib/python3.3', '/data/app/guillem-py3-dj17-
>> test/lib/python3.3/site-packa
>> ges']
>>
>>
>>
>>
>> I am reading about the differnces for mod_wsgi from python2.x to
>> python3.x but I fail to find clear documentation about how the wsgi.py and
>> settings.py should look like in python3.
>>
>> On Wednesday, 7 May 2014 00:20:00 UTC+2, Timothy W. Cook wrote:
>>>
>>>
>>> On Tue, May 6, 2014 at 7:01 PM, Guillem Liarte <
>>> guillem...@googlemail.com> wrote:
>>>


 But I still get the locale encoding problem.  Do you guys have any
 suggestions?

 I do not recall the exact error I had with this config (once you
>>> corrected those you mentioned) but eventually I had to set:
>>>
>>> $setenforce 0
>>>
>>> to disable SELinux security.  I am sure that there is a way around this
>>> but I haven't had a need to fix it yet.
>>>
>>> HTH,
>>> Tim
>>>
>>>
>>>
>>> 
>>> Timothy Cook
>>> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>>> MLHIM http://www.mlhim.org
>>>
>>>   --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f61d9fbc-8922-4ba9-8564-45ae1eccf0f3%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 


Timothy Cook
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
MLHIM http://www.mlhim.org

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3XjtMcU_CaBEbcaMHLAG1t81rKT32fHNm3QwG-OiYTTEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-13 Thread Guillem Liarte
Has anybody being able to solve this problem with the locale in virtual env?

I am stuck with it for the moment.

It is just that Centos 6 + Django 1.7 (python3.x ) is a no-go?

Thanks.

On Wednesday, 7 May 2014 16:33:23 UTC+2, Guillem Liarte wrote:
>
> Timothy,
>
> Thanks you, but SELinux here does not seem to be the issue. I tried with 
> enforcing/permissive/disabled and the effect is the same.
>
> I belive the problem to be in the os path in the seetings:
>
> ---
>
> import os
> BASE_DIR = os.path.dirname(os.path.dirname(__file__))
> ...
> ...
>
>
>
>
>
>   
>   
>  
> --
>
> in wsgi.py :
>
> 
>
> import os, sys
> sys.path.append('/data/app/guillem-py3-dj17-test/guillem_test/guillem_test')
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "guillem_test.settings")
>
>
> ---
>
> python -c "import sys; print(sys.path)" 
> ['', '/data/app/guillem-py3-dj17-test/lib64/python33.zip', 
> '/data/app/guillem-py3-dj17-test/lib64/python3.3', 
> '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux', 
> '/data/app/guillem
> -py3-dj17-test/lib64/python3.3/lib-dynload', 
> '/opt/rh/python33/root/usr/lib64/python3.3', 
> '/opt/rh/python33/root/usr/lib/python3.3', 
> '/data/app/guillem-py3-dj17-test/lib/python3.3/site-packa
> ges']
>
>
>
>
> I am reading about the differnces for mod_wsgi from python2.x to python3.x 
> but I fail to find clear documentation about how the wsgi.py and  
> settings.py should look like in python3.
>
> On Wednesday, 7 May 2014 00:20:00 UTC+2, Timothy W. Cook wrote:
>>
>>
>> On Tue, May 6, 2014 at 7:01 PM, Guillem Liarte > > wrote:
>>
>>>
>>>
>>> But I still get the locale encoding problem.  Do you guys have any 
>>> suggestions?
>>>
>>> I do not recall the exact error I had with this config (once you 
>> corrected those you mentioned) but eventually I had to set:
>>
>> $setenforce 0
>>
>> to disable SELinux security.  I am sure that there is a way around this 
>> but I haven't had a need to fix it yet. 
>>
>> HTH,
>> Tim
>>  
>>
>>
>> 
>> Timothy Cook
>> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>> MLHIM http://www.mlhim.org
>>
>>  

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f61d9fbc-8922-4ba9-8564-45ae1eccf0f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-07 Thread Guillem Liarte
Timothy,

Thanks you, but SELinux here does not seem to be the issue. I tried with 
enforcing/permissive/disabled and the effect is the same.

I belive the problem to be in the os path in the seetings:

---

import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
...
...







 
--

in wsgi.py :



import os, sys
sys.path.append('/data/app/guillem-py3-dj17-test/guillem_test/guillem_test')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "guillem_test.settings")


---

python -c "import sys; print(sys.path)" 
['', '/data/app/guillem-py3-dj17-test/lib64/python33.zip', 
'/data/app/guillem-py3-dj17-test/lib64/python3.3', 
'/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux', 
'/data/app/guillem
-py3-dj17-test/lib64/python3.3/lib-dynload', 
'/opt/rh/python33/root/usr/lib64/python3.3', 
'/opt/rh/python33/root/usr/lib/python3.3', 
'/data/app/guillem-py3-dj17-test/lib/python3.3/site-packa
ges']




I am reading about the differnces for mod_wsgi from python2.x to python3.x 
but I fail to find clear documentation about how the wsgi.py and  
settings.py should look like in python3.

On Wednesday, 7 May 2014 00:20:00 UTC+2, Timothy W. Cook wrote:
>
>
> On Tue, May 6, 2014 at 7:01 PM, Guillem Liarte 
>  > wrote:
>
>>
>>
>> But I still get the locale encoding problem.  Do you guys have any 
>> suggestions?
>>
>> I do not recall the exact error I had with this config (once you 
> corrected those you mentioned) but eventually I had to set:
>
> $setenforce 0
>
> to disable SELinux security.  I am sure that there is a way around this 
> but I haven't had a need to fix it yet. 
>
> HTH,
> Tim
>  
>
>
> 
> Timothy Cook
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> MLHIM http://www.mlhim.org
>
>  

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/574819c6-624c-4071-9222-3a7f74be9429%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-06 Thread Timothy W. Cook
On Tue, May 6, 2014 at 7:01 PM, Guillem Liarte <
guillem.lia...@googlemail.com> wrote:

>
>
> But I still get the locale encoding problem.  Do you guys have any
> suggestions?
>
> I do not recall the exact error I had with this config (once you corrected
those you mentioned) but eventually I had to set:

$setenforce 0

to disable SELinux security.  I am sure that there is a way around this but
I haven't had a need to fix it yet.

HTH,
Tim




Timothy Cook
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
MLHIM http://www.mlhim.org

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3VfdFqrpFO3nKmz5cFc1PDjPj5Rw6crhJ4PY%3DEevhJ1mw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-06 Thread Guillem Liarte
Hello again.

The solution for the incorrect version came as a combination of both Tom's 
and  Brad's answer.

I could compile a mod_wsgi 3.4 with my python and I used the recommended 
configuration. Now I get:

[Tue May 06 23:51:30 2014] [notice] Apache/2.2.15 (Unix) DAV/2 mod_wsgi/3.4 
Python/3.3.2 configured -- resuming normal operations
Fatal Python error: Py_Initialize: Unable to get the locale encoding
Fatal Python error: Py_Initialize: Unable to get the locale encoding


I am forcing the following locale:

LANG="en_GB.UTF-8"
LC_ALL="en_GB.utf8"
LC_CTYPE="C"
LC_NUMERIC=en_GB.utf8
LC_TIME=en_GB.utf8
LC_COLLATE="en_GB.utf8"
LC_MONETARY=en_GB.utf8
LC_MESSAGES="en_GB.utf8"
LC_PAPER=en_GB.utf8
LC_NAME=en_GB.utf8
LC_ADDRESS=en_GB.utf8
LC_TELEPHONE=en_GB.utf8
LC_MEASUREMENT=en_GB.utf8
LC_IDENTIFICATION=en_GB.utf8

So I do not understand why it is not working. I have also 
/etc/sysconfig/httpd:

export LANG=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8
export LC_CTYPE=C
export LC_NUMERIC=en_GB.UTF-8
export LC_TIME=en_GB.UTF-8
export LC_COLLATE=en_GB.UTF-8
export LC_MONETARY=en_GB.UTF-8
export LC_MESSAGES=en_GB.UTF-8
export LC_PAPER=en_GB.UTF-8
export LC_NAME=en_GB.UTF-8
export LC_ADDRESS=en_GB.UTF-8
export LC_TELEPHONE=en_GB.UTF-8
export LC_MEASUREMENT=en_GB.UTF-8
export LC_IDENTIFICATION=en_GB.UTF-8


But I still get the locale encoding problem.  Do you guys have any 
suggestions?

Thanks!

On Friday, 2 May 2014 13:11:05 UTC+2, Guillem Liarte wrote:
>
> Hello,
>
> I have looked through the web in several different especialised forums but 
> I cannot find the way to do this properly.
>
> My aim is to have an environment to host Django applications running 
> Centos 6. So far I have managed to:
>
> - Get Centos 6.5 + Ptython 3.3.2 + Django 1.6 (virtual env), running a 
> test application using python's webserver. Time to move into Apache.
> - I manage to get it working from Apache but instead of Python 3.3.2, it 
> uses the Python 2.6 installed in the system. No matter if I launch apache 
> from the virtual environment, even once I have enabled python3. 
>
> I know Djanog 1.6 can use python 2.6. But that is not what i want to 
> achieve, as 1.7 will not.
>
> Just to give some idea of what I have installed:
>
>
>
> In the system:
> python --version
> Python 2.6.6 
>
> From RedHat SCL:
>
> source /opt/rh/python33/enable
>
> python --version 
> Python 3.3.2 
>
> Inside the virtual environment I have:
>
> Django (1.6.3) 
> pip (1.4.1) 
> setuptools (0.9.8) 
>
> That starts successfully:
>
> python manage.py runserver 192.168.0.16:8000
>
>
>
> Starting development server at http://192.168.0.16:8000/  
>   
>   
> Quit the server with CONTROL-C.  
>
> When getting to admin or any error page:
>
> Django Version:
>   1.6.3
> Python Version:
>   3.3.2
>
> Python Path:
>   
>
> ['/data/app/guillem-py3-dj17-test/guillem_test',
>  '/data/app/guillem-py3-dj17-test/lib64/python33.zip',
>  '/data/app/guillem-py3-dj17-test/lib64/python3.3',
>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux',
>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/lib-dynload',
>  '/opt/rh/python33/root/usr/lib64/python3.3',
>  '/opt/rh/python33/root/usr/lib/python3.3',
>  '/data/app/guillem-py3-dj17-test/lib/python3.3/site-packages']
> ___
>
>  
> When starting this from Apache 2.2 instead of the python embedded server:
>
>
> httpd -k restart -e debug
> ...
> [Fri May 02 11:53:29 2014] [debug] mod_so.c(246): loaded module wsgi_module
> ...
>
> The Apache service starts in my port of choice:
>
> tcp0  0 192.168.0.16:8082   0.0.0.0:*   
> LISTEN  1676/httpdWhat I get now is:
>
> So now I get:
>
> Django Version:   1.6
> Python Executable:/data/app/guillem-py3-dj17-test/bin/python
> Python Version:   2.6.6
> Python Path:  
>
> ['/data/app/django-test/dev/test-1/HELLO_WORLD/lib/python2.6/site-packages',
>  '/data/app/django-test/dev/test-1/HELLO_WORLD/HELLO_WORLD/..',
>  '/usr/lib64/python26.zip',
>  '/usr/lib64/python2.6',
>  '/usr/lib64/python2.6/plat-linux2',
>  '/usr/lib64/python2.6/lib-tk',
>  '/usr/lib64/python2.6/lib-old',
>  '/usr/lib64/python2.6/lib-dynload',
>  '/usr/lib64/python2.6/site-packages',
>  '/usr/lib64/python2.6/site-packages/gst-0.10',
>  '/usr/lib64/python2.6/site-packages/gtk-2.0',
>  '/usr/lib/python2.6/site-packages',
>  '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
>  '/data/app/django-test/dev/test-1/virtual/lib/python3.3/site-packages',
>  '/data/app/django-test/dev/test-1/HELLO_WORLD/']
>
>
> Just to make it clear, that python inside the virtual env is python 3.3.2:
>
> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# pwd
> /data/app/guillem-py3-dj17-test/bin
> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# which 
> python
> 

Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-05 Thread Guillem Liarte
Hello Tom,

Yes, I tried to compile wsgi with python 3.3, but I got error after error. 
Instead I came back to the original quest of finding a compiled version 
that works of, as it has also been indicated, to le apache know that that I 
wish to use a different python.

Any specific tips when compiling wsgi with python 3? I will see to produce 
the error I was getting once again.

Many thanks for replying.
Guillem


On Friday, 2 May 2014 16:28:00 UTC+2, Tom Evans wrote:
>
> On Fri, May 2, 2014 at 12:11 PM, Guillem Liarte 
>  wrote: 
> > Hello, 
> > 
> > I have looked through the web in several different especialised forums 
> but I 
> > cannot find the way to do this properly. 
> > 
> > My aim is to have an environment to host Django applications running 
> Centos 
> > 6. So far I have managed to: 
> > 
> > - Get Centos 6.5 + Ptython 3.3.2 + Django 1.6 (virtual env), running a 
> test 
> > application using python's webserver. Time to move into Apache. 
> > - I manage to get it working from Apache but instead of Python 3.3.2, it 
> > uses the Python 2.6 installed in the system. No matter if I launch 
> apache 
> > from the virtual environment, even once I have enabled python3. 
> > 
>
> mod_wsgi is linked against a specific version of python, chosen at 
> compile time. The people who compiled the mod_wsgi package in CentOS 
> chose to link it against python 2.6, and not python 3.3. 
>
> You will need to obtain, or install manually, mod_wsgi compiled 
> against python 3. 
>
> Cheers 
>
> Tom 
>
> PS: Why Python 3.3 and not Python 3.4? 
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bdeba122-e05a-44f1-93f2-d6b570a26c66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-05 Thread Brad Pitcher
It's just something that was passed down to me from a senior programmer :-)

-
Brad Pitcher


On Mon, May 5, 2014 at 2:45 PM, Guillem Liarte <
guillem.lia...@googlemail.com> wrote:

> Hello Brad,
>
> Thanks for the suggestion, I was suspecting something like that. I will
> let you know how it goes.
>
> Where do you find this? I Could not find anything like that in the wsgi
> documentation.
>
> Thank you,
>
> Guillem
>
>
> On Friday, 2 May 2014 16:37:35 UTC+2, Brad Pitcher wrote:
>
>> What does your Apache vhost config look like? You will need to add a
>> WSGIDaemonProcess directive where you can specify the python path for the
>> virtual environment, like so:
>>
>> WSGIDaemonProcess processname user=wsgi group=apache processes=1
>> threads=10 umask=0022 display-name=displayname
>> python-path=/data/app/guillem-py3-dj17-test/lib64/python3.3/
>> site-packages/
>>
>> -
>> Brad Pitcher
>>
>>
>> On Fri, May 2, 2014 at 4:11 AM, Guillem Liarte > > wrote:
>>
>>>  Hello,
>>>
>>> I have looked through the web in several different especialised forums
>>> but I cannot find the way to do this properly.
>>>
>>> My aim is to have an environment to host Django applications running
>>> Centos 6. So far I have managed to:
>>>
>>> - Get Centos 6.5 + Ptython 3.3.2 + Django 1.6 (virtual env), running a
>>> test application using python's webserver. Time to move into Apache.
>>> - I manage to get it working from Apache but instead of Python 3.3.2, it
>>> uses the Python 2.6 installed in the system. No matter if I launch apache
>>> from the virtual environment, even once I have enabled python3.
>>>
>>> I know Djanog 1.6 can use python 2.6. But that is not what i want to
>>> achieve, as 1.7 will not.
>>>
>>> Just to give some idea of what I have installed:
>>>
>>>
>>>
>>> In the system:
>>> python --version
>>> Python 2.6.6
>>>
>>> From RedHat SCL:
>>>
>>> source /opt/rh/python33/enable
>>>
>>> python --version
>>> Python 3.3.2
>>>
>>> Inside the virtual environment I have:
>>>
>>> Django (1.6.3)
>>> pip (1.4.1)
>>> setuptools (0.9.8)
>>>
>>> That starts successfully:
>>>
>>> python manage.py runserver 192.168.0.16:8000
>>>
>>>
>>>
>>> Starting development server at http://192.168.0.16:8000/
>>>
>>>
>>>
>>> Quit the server with CONTROL-C.
>>>
>>> When getting to admin or any error page:
>>>
>>> Django Version:
>>>   1.6.3
>>> Python Version:
>>>   3.3.2
>>>
>>> Python Path:
>>>
>>>
>>> ['/data/app/guillem-py3-dj17-test/guillem_test',
>>>  '/data/app/guillem-py3-dj17-test/lib64/python33.zip',
>>>  '/data/app/guillem-py3-dj17-test/lib64/python3.3',
>>>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux',
>>>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/lib-dynload',
>>>  '/opt/rh/python33/root/usr/lib64/python3.3',
>>>  '/opt/rh/python33/root/usr/lib/python3.3',
>>>  '/data/app/guillem-py3-dj17-test/lib/python3.3/site-packages']
>>> ___
>>>
>>>
>>> When starting this from Apache 2.2 instead of the python embedded server:
>>>
>>>
>>> httpd -k restart -e debug
>>>
>>>
>>>
>>> ...
>>> [Fri May 02 11:53:29 2014] [debug] mod_so.c(246): loaded module wsgi_module
>>> ...
>>>
>>> The Apache service starts in my port of choice:
>>>
>>> tcp0  0 192.168.0.16:8082   0.0.0.0:*   
>>> LISTEN  1676/httpdWhat I get now is:
>>>
>>>
>>>
>>>
>>> So now I get:
>>>
>>> Django Version: 1.6
>>> Python Executable:  /data/app/guillem-py3-dj17-test/bin/python
>>> Python Version: 2.6.6
>>> Python Path:
>>>
>>> ['/data/app/django-test/dev/test-1/HELLO_WORLD/lib/python2.6/site-packages',
>>>
>>>
>>>
>>>
>>>  '/data/app/django-test/dev/test-1/HELLO_WORLD/HELLO_WORLD/..',
>>>  '/usr/lib64/python26.zip',
>>>  '/usr/lib64/python2.6',
>>>  '/usr/lib64/python2.6/plat-linux2',
>>>  '/usr/lib64/python2.6/lib-tk',
>>>
>>>
>>>
>>>
>>>  '/usr/lib64/python2.6/lib-old',
>>>  '/usr/lib64/python2.6/lib-dynload',
>>>  '/usr/lib64/python2.6/site-packages',
>>>  '/usr/lib64/python2.6/site-packages/gst-0.10',
>>>
>>>  '/usr/lib64/python2.6/site-packages/gtk-2.0',
>>>
>>>
>>>
>>>  '/usr/lib/python2.6/site-packages',
>>>  '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
>>>  '/data/app/django-test/dev/test-1/virtual/lib/python3.3/site-packages',
>>>
>>>  '/data/app/django-test/dev/test-1/HELLO_WORLD/']
>>>
>>>
>>>
>>>
>>> Just to make it clear, that python inside the virtual env is python 3.3.2:
>>>
>>> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# pwd
>>> /data/app/guillem-py3-dj17-test/bin
>>>
>>> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# 
>>> which python
>>>
>>>
>>>
>>> /data/app/guillem-py3-dj17-test/bin/python
>>> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# 
>>> ./python --version
>>> Python 3.3.2
>>>
>>>
>>>
>>> 
>>>
>>>
>>> So, for some reason which most possibly lies with a misconfiguration from 
>>> my part, Apache ignores the fact 

Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-05 Thread Guillem Liarte
Hello Brad,

Thanks for the suggestion, I was suspecting something like that. I will let 
you know how it goes.

Where do you find this? I Could not find anything like that in the wsgi 
documentation.

Thank you,

Guillem

On Friday, 2 May 2014 16:37:35 UTC+2, Brad Pitcher wrote:
>
> What does your Apache vhost config look like? You will need to add a 
> WSGIDaemonProcess directive where you can specify the python path for the 
> virtual environment, like so:
>
> WSGIDaemonProcess processname user=wsgi group=apache processes=1 
> threads=10 umask=0022 display-name=displayname 
> python-path=/data/app/guillem-py3-dj17-test/lib64/python3.3/site-packages/
>
> -
> Brad Pitcher
>
>
> On Fri, May 2, 2014 at 4:11 AM, Guillem Liarte 
>  > wrote:
>
>> Hello,
>>
>> I have looked through the web in several different especialised forums 
>> but I cannot find the way to do this properly.
>>
>> My aim is to have an environment to host Django applications running 
>> Centos 6. So far I have managed to:
>>
>> - Get Centos 6.5 + Ptython 3.3.2 + Django 1.6 (virtual env), running a 
>> test application using python's webserver. Time to move into Apache.
>> - I manage to get it working from Apache but instead of Python 3.3.2, it 
>> uses the Python 2.6 installed in the system. No matter if I launch apache 
>> from the virtual environment, even once I have enabled python3. 
>>
>> I know Djanog 1.6 can use python 2.6. But that is not what i want to 
>> achieve, as 1.7 will not.
>>
>> Just to give some idea of what I have installed:
>>
>>
>>
>> In the system:
>> python --version
>> Python 2.6.6 
>>
>> From RedHat SCL:
>>
>> source /opt/rh/python33/enable
>>
>> python --version 
>> Python 3.3.2 
>>
>> Inside the virtual environment I have:
>>
>> Django (1.6.3) 
>> pip (1.4.1) 
>> setuptools (0.9.8) 
>>
>> That starts successfully:
>>
>> python manage.py runserver 192.168.0.16:8000
>>
>>
>>
>> Starting development server at http://192.168.0.16:8000/ 
>>  
>> 
>>
>>
>> Quit the server with CONTROL-C.  
>>
>> When getting to admin or any error page:
>>
>> Django Version:
>>   1.6.3
>> Python Version:
>>   3.3.2
>>
>> Python Path:
>>   
>>
>> ['/data/app/guillem-py3-dj17-test/guillem_test',
>>  '/data/app/guillem-py3-dj17-test/lib64/python33.zip',
>>  '/data/app/guillem-py3-dj17-test/lib64/python3.3',
>>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux',
>>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/lib-dynload',
>>  '/opt/rh/python33/root/usr/lib64/python3.3',
>>  '/opt/rh/python33/root/usr/lib/python3.3',
>>  '/data/app/guillem-py3-dj17-test/lib/python3.3/site-packages']
>> ___
>>
>>  
>> When starting this from Apache 2.2 instead of the python embedded server:
>>
>>
>> httpd -k restart -e debug
>>
>>
>>
>> ...
>> [Fri May 02 11:53:29 2014] [debug] mod_so.c(246): loaded module wsgi_module
>> ...
>>
>> The Apache service starts in my port of choice:
>>
>> tcp0  0 192.168.0.16:8082   0.0.0.0:*   
>> LISTEN  1676/httpdWhat I get now is:
>>
>>
>>
>> So now I get:
>>
>> Django Version:  1.6
>> Python Executable:   /data/app/guillem-py3-dj17-test/bin/python
>> Python Version:  2.6.6
>> Python Path: 
>>
>> ['/data/app/django-test/dev/test-1/HELLO_WORLD/lib/python2.6/site-packages',
>>
>>
>>
>>  '/data/app/django-test/dev/test-1/HELLO_WORLD/HELLO_WORLD/..',
>>  '/usr/lib64/python26.zip',
>>  '/usr/lib64/python2.6',
>>  '/usr/lib64/python2.6/plat-linux2',
>>  '/usr/lib64/python2.6/lib-tk',
>>
>>
>>
>>  '/usr/lib64/python2.6/lib-old',
>>  '/usr/lib64/python2.6/lib-dynload',
>>  '/usr/lib64/python2.6/site-packages',
>>  '/usr/lib64/python2.6/site-packages/gst-0.10',
>>  '/usr/lib64/python2.6/site-packages/gtk-2.0',
>>
>>
>>
>>  '/usr/lib/python2.6/site-packages',
>>  '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
>>  '/data/app/django-test/dev/test-1/virtual/lib/python3.3/site-packages',
>>  '/data/app/django-test/dev/test-1/HELLO_WORLD/']
>>
>>
>>
>>
>> Just to make it clear, that python inside the virtual env is python 3.3.2:
>>
>> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# pwd
>> /data/app/guillem-py3-dj17-test/bin
>> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# 
>> which python
>>
>>
>>
>> /data/app/guillem-py3-dj17-test/bin/python
>> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# 
>> ./python --version
>> Python 3.3.2 
>>  
>> 
>>
>>
>>
>> 
>>
>>
>> So, for some reason which most possibly lies with a misconfiguration from my 
>> part, Apache ignores the fact that theer is another python installed in 

Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-02 Thread Brad Pitcher
What does your Apache vhost config look like? You will need to add a
WSGIDaemonProcess directive where you can specify the python path for the
virtual environment, like so:

WSGIDaemonProcess processname user=wsgi group=apache processes=1 threads=10
umask=0022 display-name=displayname
python-path=/data/app/guillem-py3-dj17-test/lib64/python3.3/site-packages/

-
Brad Pitcher


On Fri, May 2, 2014 at 4:11 AM, Guillem Liarte <
guillem.lia...@googlemail.com> wrote:

> Hello,
>
> I have looked through the web in several different especialised forums but
> I cannot find the way to do this properly.
>
> My aim is to have an environment to host Django applications running
> Centos 6. So far I have managed to:
>
> - Get Centos 6.5 + Ptython 3.3.2 + Django 1.6 (virtual env), running a
> test application using python's webserver. Time to move into Apache.
> - I manage to get it working from Apache but instead of Python 3.3.2, it
> uses the Python 2.6 installed in the system. No matter if I launch apache
> from the virtual environment, even once I have enabled python3.
>
> I know Djanog 1.6 can use python 2.6. But that is not what i want to
> achieve, as 1.7 will not.
>
> Just to give some idea of what I have installed:
>
>
>
> In the system:
> python --version
> Python 2.6.6
>
> From RedHat SCL:
>
> source /opt/rh/python33/enable
>
> python --version
> Python 3.3.2
>
> Inside the virtual environment I have:
>
> Django (1.6.3)
> pip (1.4.1)
> setuptools (0.9.8)
>
> That starts successfully:
>
> python manage.py runserver 192.168.0.16:8000
>
>
>
> Starting development server at http://192.168.0.16:8000/
>
> Quit the server with CONTROL-C.
>
> When getting to admin or any error page:
>
> Django Version:
>   1.6.3
> Python Version:
>   3.3.2
>
> Python Path:
>
>
> ['/data/app/guillem-py3-dj17-test/guillem_test',
>  '/data/app/guillem-py3-dj17-test/lib64/python33.zip',
>  '/data/app/guillem-py3-dj17-test/lib64/python3.3',
>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux',
>  '/data/app/guillem-py3-dj17-test/lib64/python3.3/lib-dynload',
>  '/opt/rh/python33/root/usr/lib64/python3.3',
>  '/opt/rh/python33/root/usr/lib/python3.3',
>  '/data/app/guillem-py3-dj17-test/lib/python3.3/site-packages']
> ___
>
>
> When starting this from Apache 2.2 instead of the python embedded server:
>
>
> httpd -k restart -e debug
>
>
> ...
> [Fri May 02 11:53:29 2014] [debug] mod_so.c(246): loaded module wsgi_module
> ...
>
> The Apache service starts in my port of choice:
>
> tcp0  0 192.168.0.16:8082   0.0.0.0:*   
> LISTEN  1676/httpdWhat I get now is:
>
>
> So now I get:
>
> Django Version:   1.6
> Python Executable:/data/app/guillem-py3-dj17-test/bin/python
> Python Version:   2.6.6
> Python Path:  
>
> ['/data/app/django-test/dev/test-1/HELLO_WORLD/lib/python2.6/site-packages',
>
>
>  '/data/app/django-test/dev/test-1/HELLO_WORLD/HELLO_WORLD/..',
>  '/usr/lib64/python26.zip',
>  '/usr/lib64/python2.6',
>  '/usr/lib64/python2.6/plat-linux2',
>  '/usr/lib64/python2.6/lib-tk',
>
>
>  '/usr/lib64/python2.6/lib-old',
>  '/usr/lib64/python2.6/lib-dynload',
>  '/usr/lib64/python2.6/site-packages',
>  '/usr/lib64/python2.6/site-packages/gst-0.10',
>  '/usr/lib64/python2.6/site-packages/gtk-2.0',
>
>
>  '/usr/lib/python2.6/site-packages',
>  '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
>  '/data/app/django-test/dev/test-1/virtual/lib/python3.3/site-packages',
>  '/data/app/django-test/dev/test-1/HELLO_WORLD/']
>
>
>
> Just to make it clear, that python inside the virtual env is python 3.3.2:
>
> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# pwd
> /data/app/guillem-py3-dj17-test/bin
> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# which 
> python
>
>
> /data/app/guillem-py3-dj17-test/bin/python
> (guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# 
> ./python --version
> Python 3.3.2
>
>
>
> 
>
>
> So, for some reason which most possibly lies with a misconfiguration from my 
> part, Apache ignores the fact that theer is another python installed in the 
> system.
>
>
> I believe this happens because the installed mod_wsgi is not compatible:
>
>
> mod_wsgi-3.2-3.el6.x86_64
>
> Is this the case?
>
>
>
>
> For whatI read here:
>
> http://code.google.com/p/modwsgi/wiki/SupportForPython3X
>
> I should be fine with mod_wsgi 3.2
>
> ___
>
>
> What I have tried:
>
> - Install apache 2.4 alongside 2.2. Even if I can get a suitable mod_wsgi
> mod, I get library dependancy problems, one with python 2.7, which should
> be solvable, and another for glibc, which may be more triky.
>
> All, in it looks like Centos 6.5 + Python 3.3.X + Django 1.6 is not
> possible for the moment.
>
> Am I right?
>
> If there is a way, please let me know!
>
> Many thanks in advance.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django 

Re: Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-02 Thread Tom Evans
On Fri, May 2, 2014 at 12:11 PM, Guillem Liarte
 wrote:
> Hello,
>
> I have looked through the web in several different especialised forums but I
> cannot find the way to do this properly.
>
> My aim is to have an environment to host Django applications running Centos
> 6. So far I have managed to:
>
> - Get Centos 6.5 + Ptython 3.3.2 + Django 1.6 (virtual env), running a test
> application using python's webserver. Time to move into Apache.
> - I manage to get it working from Apache but instead of Python 3.3.2, it
> uses the Python 2.6 installed in the system. No matter if I launch apache
> from the virtual environment, even once I have enabled python3.
>

mod_wsgi is linked against a specific version of python, chosen at
compile time. The people who compiled the mod_wsgi package in CentOS
chose to link it against python 2.6, and not python 3.3.

You will need to obtain, or install manually, mod_wsgi compiled
against python 3.

Cheers

Tom

PS: Why Python 3.3 and not Python 3.4?

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1K%3DUL1CfEer3azbbSZUP0G5e1C-ymuM5YoJeA%3DXCjfaHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Centos 6.5 Python 3.3.x Django 1.6 Apache 2.2

2014-05-02 Thread Guillem Liarte
Hello,

I have looked through the web in several different especialised forums but 
I cannot find the way to do this properly.

My aim is to have an environment to host Django applications running Centos 
6. So far I have managed to:

- Get Centos 6.5 + Ptython 3.3.2 + Django 1.6 (virtual env), running a test 
application using python's webserver. Time to move into Apache.
- I manage to get it working from Apache but instead of Python 3.3.2, it 
uses the Python 2.6 installed in the system. No matter if I launch apache 
from the virtual environment, even once I have enabled python3. 

I know Djanog 1.6 can use python 2.6. But that is not what i want to 
achieve, as 1.7 will not.

Just to give some idea of what I have installed:



In the system:
python --version
Python 2.6.6 

>From RedHat SCL:

source /opt/rh/python33/enable

python --version 
Python 3.3.2 

Inside the virtual environment I have:

Django (1.6.3) 
pip (1.4.1) 
setuptools (0.9.8) 

That starts successfully:

python manage.py runserver 192.168.0.16:8000



Starting development server at http://192.168.0.16:8000/

  
Quit the server with CONTROL-C.  

When getting to admin or any error page:

Django Version:
  1.6.3
Python Version:
  3.3.2

Python Path:
  

['/data/app/guillem-py3-dj17-test/guillem_test',
 '/data/app/guillem-py3-dj17-test/lib64/python33.zip',
 '/data/app/guillem-py3-dj17-test/lib64/python3.3',
 '/data/app/guillem-py3-dj17-test/lib64/python3.3/plat-linux',
 '/data/app/guillem-py3-dj17-test/lib64/python3.3/lib-dynload',
 '/opt/rh/python33/root/usr/lib64/python3.3',
 '/opt/rh/python33/root/usr/lib/python3.3',
 '/data/app/guillem-py3-dj17-test/lib/python3.3/site-packages']
___

 
When starting this from Apache 2.2 instead of the python embedded server:


httpd -k restart -e debug
...
[Fri May 02 11:53:29 2014] [debug] mod_so.c(246): loaded module wsgi_module
...

The Apache service starts in my port of choice:

tcp0  0 192.168.0.16:8082   0.0.0.0:*   
LISTEN  1676/httpdWhat I get now is:

So now I get:

Django Version: 1.6
Python Executable:  /data/app/guillem-py3-dj17-test/bin/python
Python Version: 2.6.6
Python Path:

['/data/app/django-test/dev/test-1/HELLO_WORLD/lib/python2.6/site-packages',
 '/data/app/django-test/dev/test-1/HELLO_WORLD/HELLO_WORLD/..',
 '/usr/lib64/python26.zip',
 '/usr/lib64/python2.6',
 '/usr/lib64/python2.6/plat-linux2',
 '/usr/lib64/python2.6/lib-tk',
 '/usr/lib64/python2.6/lib-old',
 '/usr/lib64/python2.6/lib-dynload',
 '/usr/lib64/python2.6/site-packages',
 '/usr/lib64/python2.6/site-packages/gst-0.10',
 '/usr/lib64/python2.6/site-packages/gtk-2.0',
 '/usr/lib/python2.6/site-packages',
 '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
 '/data/app/django-test/dev/test-1/virtual/lib/python3.3/site-packages',
 '/data/app/django-test/dev/test-1/HELLO_WORLD/']


Just to make it clear, that python inside the virtual env is python 3.3.2:

(guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# pwd
/data/app/guillem-py3-dj17-test/bin
(guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# which 
python
/data/app/guillem-py3-dj17-test/bin/python
(guillem-py3-dj17-test)ndoluxel002:/data/app/guillem-py3-dj17-test/bin# 
./python --version
Python 3.3.2

  






So, for some reason which most possibly lies with a misconfiguration from my 
part, Apache ignores the fact that theer is another python installed in the 
system.


I believe this happens because the installed mod_wsgi is not compatible:

mod_wsgi-3.2-3.el6.x86_64

Is this the case?




For whatI read here:

http://code.google.com/p/modwsgi/wiki/SupportForPython3X

I should be fine with mod_wsgi 3.2

___


What I have tried:

- Install apache 2.4 alongside 2.2. Even if I can get a suitable mod_wsgi 
mod, I get library dependancy problems, one with python 2.7, which should 
be solvable, and another for glibc, which may be more triky.

All, in it looks like Centos 6.5 + Python 3.3.X + Django 1.6 is not 
possible for the moment.

Am I right?

If there is a way, please let me know!

Many thanks in advance.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aab4ab40-d466-4903-b75d-8a99285cad3f%40googlegroups.com.

Re: django, mod_wsgi, apache and sharing media files (video) from a separate directory

2014-04-20 Thread Ramón Carrillo
Hi Adam,

>From your settings.py I guess the expanded url is something like
/PROYECTOS/file.xyz, right?

But, in your Apache alias your are serving the url /proyectos/ [0],
and urls are case sensitive unless you're using mod_speling [1].

I think "Alias /PROYECTOS/ /PROYECTOS/" should do the trick.

[0] http://httpd.apache.org/docs/2.4/mod/mod_alias.html#alias
[1] http://httpd.apache.org/docs/2.4/mod/mod_speling.html

On Sun, Apr 20, 2014 at 9:19 AM, Adam Teale <adamte...@gmail.com> wrote:
> Hi Guys,
>
>
> I am building a django app that runs out of my /Users/me/Dropbox directory.
>
>
> Localhost is pointed at my /Users/me/Sites directory.
>
>
> mod_wsgi installed.
>
> apache installed
>
> django installed and app working fine in development mode
>
>
> I am trying to embed media in a template
>
> This media comes from a directory outside of the django app - in the root of
> the machine - /PROYECTOS
>
>
> The permissions for the directories and preceding directories are readable
> by _www
>
>
> I think that I understand that
>
> - mod_wsgi will serve the dynamic files
>
> - apache will serve the static files like the css and template files, as
> well as the media files I am referencing in the /PROYECTOS directory
>
>
> I have the following in my settings.py:
>
> STATICFILES_DIRS = (os.path.join(BASE, "static"), )
>
> STATIC_URL = "/static/"
>
> MEDIA_URL = "/PROYECTOS/"
>
> WSGI_APPLICATION = 'mbrain.wsgi.application'
>
>
> In the /etc/apache2/extra/vhosts/localhost.conf I have:
>
>
> 
>
>
> DocumentRoot "/Users/me/Sites/localhost"
>
> ServerName localhost
>
>
> WSGIDaemonProcess localhost
> python-path=/Users/me/Dropbox/mBrain_Adam/mbrain/:/Users/me/Dropbox/mBrain_Adam/mbrain/venv/include/python2.7
>
> WSGIProcessGroup localhost
>
>
> Alias /proyectos/ /PROYECTOS/
>
>
> 
>
> Require all granted
>
> 
>
>
> WSGIScriptAlias / /Users/me/Dropbox/mBrain_Adam/mbrain/mbrain/wsgi.py
>
>
> 
>
> 
>
> Require all granted
>
> 
>
> 
>
>
> 
>
>
> So to embed a media file in a template I have this as the url:
>
> {{ MEDIA_URL }}{{ asset.assetPath }}
>
>
> When I load the page in a browser the console shows the fully expanded path
> for the media asset but with a 404 error - HTTP/1.1" 404 3045.
>
>
> I’d really appreciate any feedback on whether I am approaching this the
> right way or if I have completely missed the concept.
>
> Also any help on that 404 error would be appreciated.
>
>
> Cheers!
>
>
> Adam
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e6294564-01f1-449c-8cfb-e8dd474bda0b%40googlegroups.com.
> 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABoKswiPe%2BJqz58zG5uiBHA%2Bha6UOuMcaXMDj9acw36LAwk1Eg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


django, mod_wsgi, apache and sharing media files (video) from a separate directory

2014-04-20 Thread Adam Teale


Hi Guys,


I am building a django app that runs out of my /Users/me/Dropbox directory.


Localhost is pointed at my /Users/me/Sites directory.


mod_wsgi installed.

apache installed

django installed and app working fine in development mode


I am trying to embed media in a template

This media comes from a directory outside of the django app - in the root 
of the machine - /PROYECTOS


The permissions for the directories and preceding directories are readable 
by _www


I think that I understand that

- mod_wsgi will serve the dynamic files

- apache will serve the static files like the css and template files, as 
well as the media files I am referencing in the /PROYECTOS directory


I have the following in my settings.py:

STATICFILES_DIRS = (os.path.join(BASE, "static"), )

STATIC_URL = "/static/"

MEDIA_URL = "/PROYECTOS/"

WSGI_APPLICATION = 'mbrain.wsgi.application'


In the /etc/apache2/extra/vhosts/localhost.conf I have:





 DocumentRoot "/Users/me/Sites/localhost"

ServerName localhost


 WSGIDaemonProcess localhost 
python-path=/Users/me/Dropbox/mBrain_Adam/mbrain/:/Users/me/Dropbox/mBrain_Adam/mbrain/venv/include/python2.7

WSGIProcessGroup localhost


 Alias /proyectos/ /PROYECTOS/


 

Require all granted




 WSGIScriptAlias / /Users/me/Dropbox/mBrain_Adam/mbrain/mbrain/wsgi.py


 



Require all granted









So to embed a media file in a template I have this as the url:

{{ MEDIA_URL }}{{ asset.assetPath }}


When I load the page in a browser the console shows the fully expanded path 
for the media asset but with a 404 error - HTTP/1.1" 404 3045.


I’d really appreciate any feedback on whether I am approaching this the 
right way or if I have completely missed the concept.

Also any help on that 404 error would be appreciated.


Cheers!


Adam

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e6294564-01f1-449c-8cfb-e8dd474bda0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: About Django CentOS Apache

2014-04-09 Thread Choro H
Thank you.

this is my wsgi.py file:

import os, sys
sys.path.append("/var/www/html/ihtmks_test/test")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test.settings")

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()



2014年4月9日水曜日 23時08分27秒 UTC+9 Daniel Roseman:
>
> On Wednesday, 9 April 2014 12:44:29 UTC+1, Choro H wrote:
>>
>> i have the  following error, why? Please help me 
>> ImportError: Could not import settings 'kanre.settings' (Is it on 
>> sys.path? Is there an import error in the settings file?): No module named 
>> kanre.settings
>> ImportError: Could not import settings 'test.settings' (Is it on 
>> sys.path? Is there an import error in the settings file?): No module named 
>> test.settings
>>
>>
>>
> You should post your wsgi.py file. Are you setting the Python path there? 
> If not, then you haven't told Python where to find your kanre or test 
> projects, so it's not surprising it can't find them.
> --
> DR.
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d03722bb-bde0-4fad-abcc-3a4b04110748%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: About Django CentOS Apache

2014-04-09 Thread Daniel Roseman
On Wednesday, 9 April 2014 12:44:29 UTC+1, Choro H wrote:
>
> i have the  following error, why? Please help me 
> ImportError: Could not import settings 'kanre.settings' (Is it on 
> sys.path? Is there an import error in the settings file?): No module named 
> kanre.settings
> ImportError: Could not import settings 'test.settings' (Is it on sys.path? 
> Is there an import error in the settings file?): No module named 
> test.settings
>
>
>
You should post your wsgi.py file. Are you setting the Python path there? 
If not, then you haven't told Python where to find your kanre or test 
projects, so it's not surprising it can't find them.
--
DR.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/afd13c03-ac5b-4b3a-91c7-1757844ce833%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


About Django CentOS Apache

2014-04-09 Thread Choro H
i have the  following error, why? Please help me 
ImportError: Could not import settings 'kanre.settings' (Is it on sys.path? 
Is there an import error in the settings file?): No module named 
kanre.settings
ImportError: Could not import settings 'test.settings' (Is it on sys.path? 
Is there an import error in the settings file?): No module named 
test.settings

i' m using : CentOS Django Apache mod_wsgi
and this is my :
 vim /etc/httpd/conf.d/virtualhost.conf

NameVirtualHost *:80


ServerName test/kanre
WSGIScriptAlias /test/kanre /var/www/html/test/kanre/kanre/wsgi.py
SetEnv DJANGO_SETTINGS_MODULE kanre.settings

Order allow,deny
Allow from all




ServerName test
WSGIScriptAlias /test /var/www/html/test/test/test/wsgi.py
SetEnv DJANGO_SETTINGS_MODULE test.settings

Order allow,deny
Allow from all



 and this is my:
vim /etc/httpd/conf.d/wsgi.conf
WSGIScriptAlias /test/kanre /var/www/html/test/kanre/kanre/wsgi.py

Alias /static/ "/test/kanre/kanre/static/"

WSGIScriptAlias /test /var/www/html/test/test/test/wsgi.py

Alias /static/ "/test/test/test/static/"




-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/82381a23-4bbe-4c66-919e-ed342af4e5b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: deploy django and apache mod wsgi

2014-01-20 Thread Timothy W. Cook
On Mon, Jan 20, 2014 at 11:32 AM, parnigot  wrote:

> Can you post:
>
>
>- your_app.wsgi file
>- apache version
>- apache configuration
>- apache error.log
>
>
>

AND! your OS And version.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3VLo%3DbYNof4b0L1gh%3DxkeoDDPCi3QwPJ-dr-uJ11Z7JeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: deploy django and apache mod wsgi

2014-01-20 Thread Toran Billups
Also what does your httpd.conf file look like? Are you doing a deny from 
all anywhere?



On Monday, January 20, 2014 3:36:04 AM UTC-6, George Alvarado wrote:
>
> I try deploy django and apache2 apache2 mod-wsgi. An app for tets and open 
> the bowser, navigate in the correct url it says "error 403 tes.com cant 
> acces / on this server", i know its about permisions but how can fix it?

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/68a34951-7946-4c03-87e7-2b8ff8c4436b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: deploy django and apache mod wsgi

2014-01-20 Thread parnigot
Can you post:

your_app.wsgi file
apache version
apache configuration
apache error.log

Cheers,

Il giorno 20/gen/2014, alle ore 10:36, George Alvarado  ha 
scritto:

> I try deploy django and apache2 apache2 mod-wsgi. An app for tets and open 
> the bowser, navigate in the correct url it says "error 403 tes.com cant acces 
> / on this server", i know its about permisions but how can fix it?
> 
> -- 
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/58c916a0-ff5d-4ca2-b3b1-1d4b90e65102%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

e.p.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6BD1D7B7-159E-4A23-94B3-DB2D72392C81%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


deploy django and apache mod wsgi

2014-01-20 Thread George Alvarado
I try deploy django and apache2 apache2 mod-wsgi. An app for tets and open the 
bowser, navigate in the correct url it says "error 403 tes.com cant acces / on 
this server", i know its about permisions but how can fix it?

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/58c916a0-ff5d-4ca2-b3b1-1d4b90e65102%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Python 2.7 + Django 1.4 + apache 2.4

2013-07-16 Thread Mike Dewhirst

On 16/07/2013 9:59pm, Robert Jonathan Šimon wrote:

I have one question what must be in wsgi.py?


This is mine ... which works for Django 1.5

from __future__ import unicode_literals
# -*- coding: utf-8 -*-
import os
import sys
from django.core.wsgi import get_wsgi_application

project = "xxx"
srvroot = "/var/www"
site_root = os.path.join(srvroot, project)

if site_root not in sys.path:
sys.path.insert(0, site_root)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", 
"{0}.settings".format(project))

os.environ.setdefault("PYTHON_EGG_CACHE", site_root)

application = get_wsgi_application()

# assumes /var/www/{project}/{project}/settings.py




Dne úterý, 16. Ä ervence 2013 1:11:48 UTC+2 maiquel napsal(a):

How to set up django on Apache

I'm using django 1.4
and apache 2.4
and Python 2.7
My configuration is well

in httpd.conf

WSGIScriptAlias ​​/ C :/ xampp / htdocs / My_blog / My_blog /
wsgi.py
WSGIPythonPath / C :/ xampp / htdocs / My_blog /



Order deny, allow
Allow from all



Does anyone know what is wrong?

--
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




--
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Python 2.7 + Django 1.4 + apache 2.4

2013-07-16 Thread Lukas Nemec

Take a look here:

https://nemec.lu/en/how-to/~django-nginx-uwsgi-ssl

It is not apache, but nginx + uwsgi app + django

wsgi.py is generated automatically by manage.py startproject

example is here:
https://github.com/lunemec/wysiwyg/blob/master/wysiwyg/wsgi.py

Note: this is the app that runs under the hood of http://nemec.lu
so it is working...



On 07/16/2013 01:59 PM, Robert Jonathan Šimon wrote:

I have one question what must be in wsgi.py?

Dne úterý, 16. července 2013 1:11:48 UTC+2 maiquel napsal(a):

How to set up django on Apache

I'm using django 1.4
and apache 2.4
and Python 2.7
My configuration is well

in httpd.conf

WSGIScriptAlias ​​/ C :/ xampp / htdocs / My_blog / My_blog / wsgi.py
WSGIPythonPath / C :/ xampp / htdocs / My_blog /



Order deny, allow
Allow from all



Does anyone know what is wrong?

--
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




--
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Python 2.7 + Django 1.4 + apache 2.4

2013-07-16 Thread Robert Jonathan Šimon
I have one question what must be in wsgi.py?

Dne úterý, 16. července 2013 1:11:48 UTC+2 maiquel napsal(a):
>
> How to set up django on Apache
>
> I'm using django 1.4
> and apache 2.4
> and Python 2.7
> My configuration is well
>
> in httpd.conf
>
> WSGIScriptAlias ​​/ C :/ xampp / htdocs / My_blog / My_blog / wsgi.py
> WSGIPythonPath / C :/ xampp / htdocs / My_blog /
>
> 
> 
> Order deny, allow
> Allow from all
> 
> 
>
> Does anyone know what is wrong?
>

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Python 2.7 + Django 1.4 + apache 2.4

2013-07-16 Thread Mike Dewhirst

On 16/07/2013 12:25pm, carlos wrote:

where is the error ??


On Mon, Jul 15, 2013 at 5:11 PM, maiquel <maiquelknech...@gmail.com
<mailto:maiquelknech...@gmail.com>> wrote:

How to set up django on Apache

    I'm using django 1.4
    and apache 2.4
and Python 2.7
My configuration is well

in httpd.conf



There are spaces everywhere on the next 2 lines and I don't know what 
Apache might think of them. Check below for a working config.



WSGIScriptAlias / C :/ xampp / htdocs / My_blog / My_blog / wsgi.py
WSGIPythonPath / C :/ xampp / htdocs / My_blog /



Order deny, allow
Allow from all



Does anyone know what is wrong?





 DocumentRoot /var/www/xxx/htdocs/
 ServerName xxx.xxx.com.au
 ServerAdmin webmas...@xxx.com.au

 HostnameLookups Off
 UseCanonicalName Off

 ErrorLog ${APACHE_LOG_DIR}/xxx-error.log
 CustomLog ${APACHE_LOG_DIR}/xxx-access.log combined

 Alias /robots.txt /var/www/static/xxx/robots/robots.txt
 Alias /favicon.ico /var/www/static/xxx/img/xxx.ico

 # lock the public out
 
  AllowOverride None
  Order deny,allow
  Deny from all
 

 # serve uploaded media from here
 
  AllowOverride None
  Order deny,allow
  Allow from all
 

 # serve static stuff from here
 
  AllowOverride None
  Order deny,allow
  Allow from all
 

 
  Alias /media/ /var/www/media/xxx/
  Alias /static/ /var/www/static/xxx/
  #Alias /tiny_mce/ /var/www/static/xxx/js/tiny_mce/
  Alias /jquery/ /var/www/static/xxx/js/jquery/
 

 # now let the public access anything here because it holds nothing
 
  AllowOverride None
  Order deny,allow
  Allow from all
 

 
   WSGIScriptAlias / /var/www/xxx/xxx/xxx.wsgi
   
 Order deny,allow
 Allow from all
   
 




--
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Python 2.7 + Django 1.4 + apache 2.4

2013-07-15 Thread carlos
where is the error ??


On Mon, Jul 15, 2013 at 5:11 PM, maiquel <maiquelknech...@gmail.com> wrote:

> How to set up django on Apache
>
> I'm using django 1.4
> and apache 2.4
> and Python 2.7
> My configuration is well
>
> in httpd.conf
>
> WSGIScriptAlias / C :/ xampp / htdocs / My_blog / My_blog / wsgi.py
> WSGIPythonPath / C :/ xampp / htdocs / My_blog /
>
> 
> 
> Order deny, allow
> Allow from all
> 
> 
>
> Does anyone know what is wrong?
>
> --
> 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 http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Python 2.7 + Django 1.4 + apache 2.4

2013-07-15 Thread maiquel
How to set up django on Apache

I'm using django 1.4
and apache 2.4
and Python 2.7
My configuration is well

in httpd.conf

WSGIScriptAlias / C :/ xampp / htdocs / My_blog / My_blog / wsgi.py
WSGIPythonPath / C :/ xampp / htdocs / My_blog /



Order deny, allow
Allow from all



Does anyone know what is wrong?

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django and apache

2013-05-12 Thread Venkatraman S
Set STATIC_ROOT in your settings.py and run 'collectstatic'.
You need not mention in your /static/admin
/usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin in your
apache conf then.

On Mon, May 13, 2013 at 7:16 AM, Stanley Agba <stanley.a...@gmail.com>wrote:

> Thanks Guys,
> The server is up and running with mod_wsgi, tho the admin page is not
> loading with the static files.
> I have added this to my apache.conf file:
>  Alias /static/admin
> /usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin
> Kind of stuck after this
>
>
>
> On Sunday, 12 May 2013 11:17:04 UTC+1, Stanley Agba wrote:
>>
>> Hello guys,
>> please I'm kind of a noob at django and I'm trying to deploy a django
>> site on Apache with mod_wsgi, I am not using a virtualenv as the server has
>> python installed.
>> I added the following to my /etc/apache2/apache2.conf
>>
>> 
>>ServerName example
>>ServerAlias example
>>ServerAdmin exam...@example.com
>>
>>DocumentRoot /var/www/example/static
>>WSGIScriptAlias / /var/www/example/example/wsgi.**py
>>WSGIPythonPath  /var/www/example
>>
>>
>>   Order allow,deny
>>   Allow from all
>>
>>
>>
>>Alias /head.jpg  /var/www/example/static/head.**jpg
>>Alias /media/ /var/www/example/uploads
>>Alias /static /var/www/example/static
>>
>>
>>Order deny,allow
>>Allow from all
>>
>>
>>   
>>   Order deny,allow
>>   Allow from all
>>   
>>
>>   ErrorLog /var/www/python_ng/logs/error.**log
>>   CustomLog /var/www/python_ng/logs/**access.log combined
>> 
>>
>> I got a 'WSGIPythonPath cannot be in virtual host section' error.
>> I have searched for previous topics but i have not been able to get a
>> solution, I would greatly appreciate any help.
>> Thanks
>>
>  --
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django and apache

2013-05-12 Thread Stanley Agba
Thanks Guys,
The server is up and running with mod_wsgi, tho the admin page is not 
loading with the static files.
I have added this to my apache.conf file:
 Alias /static/admin 
/usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin
Kind of stuck after this



On Sunday, 12 May 2013 11:17:04 UTC+1, Stanley Agba wrote:
>
> Hello guys, 
> please I'm kind of a noob at django and I'm trying to deploy a django site 
> on Apache with mod_wsgi, I am not using a virtualenv as the server has 
> python installed.
> I added the following to my /etc/apache2/apache2.conf 
>
> 
>ServerName example
>ServerAlias example
>ServerAdmin exam...@example.com
>
>DocumentRoot /var/www/example/static
>WSGIScriptAlias / /var/www/example/example/wsgi.py
>WSGIPythonPath  /var/www/example
>
>
>   Order allow,deny
>   Allow from all
>
>
>
>Alias /head.jpg  /var/www/example/static/head.jpg
>Alias /media/ /var/www/example/uploads
>Alias /static /var/www/example/static
>
>
>Order deny,allow
>Allow from all
>
>
>   
>   Order deny,allow
>   Allow from all
>   
>
>   ErrorLog /var/www/python_ng/logs/error.log
>   CustomLog /var/www/python_ng/logs/access.log combined
> 
>
> I got a 'WSGIPythonPath cannot be in virtual host section' error.
> I have searched for previous topics but i have not been able to get a 
> solution, I would greatly appreciate any help.
> Thanks
>

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django and apache

2013-05-12 Thread Venkatraman S
What i am going to suggest is totally orthogonal to your requirement as i
am not helping you with apace+mod_wsgi. Though this generally works, but i
think you should consider nginx if you are thinking about new deployments
or learning this skill.

And the reasons why i suggest nginx? Well..
1. extremely simple config file
2. my experiments showed me darn low cpu and memory consumption patterns.
...and many more that you will find on a quick web-search for 'nginx vs
apache'; but these were the primary motivators for me.

Also, i see nginx+uwsgi sits pretty well and is pretty easy to manage. I
also hear good things about gunicorn and it looks simple too. But i like
some of the features of uwsgi(like spooler) which makes me tilt towards it.

-V



On Sun, May 12, 2013 at 3:47 PM, Stanley Agba <stanley.a...@gmail.com>wrote:

> Hello guys,
> please I'm kind of a noob at django and I'm trying to deploy a django site
> on Apache with mod_wsgi, I am not using a virtualenv as the server has
> python installed.
> I added the following to my /etc/apache2/apache2.conf
>
> 
>ServerName example
>ServerAlias example
>ServerAdmin exam...@example.com
>
>DocumentRoot /var/www/example/static
>WSGIScriptAlias / /var/www/example/example/wsgi.py
>WSGIPythonPath  /var/www/example
>
>
>   Order allow,deny
>   Allow from all
>
>
>
>Alias /head.jpg  /var/www/example/static/head.jpg
>Alias /media/ /var/www/example/uploads
>Alias /static /var/www/example/static
>
>
>Order deny,allow
>Allow from all
>
>
>   
>   Order deny,allow
>   Allow from all
>   
>
>   ErrorLog /var/www/python_ng/logs/error.log
>   CustomLog /var/www/python_ng/logs/access.log combined
> 
>
> I got a 'WSGIPythonPath cannot be in virtual host section' error.
> I have searched for previous topics but i have not been able to get a
> solution, I would greatly appreciate any help.
> Thanks
>
> --
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django and apache

2013-05-12 Thread Branko Majic
On Sun, 12 May 2013 03:17:04 -0700 (PDT)
Stanley Agba <stanley.a...@gmail.com> wrote:

> Hello guys, 
> please I'm kind of a noob at django and I'm trying to deploy a django
> site on Apache with mod_wsgi, I am not using a virtualenv as the
> server has python installed.
> I added the following to my /etc/apache2/apache2.conf 
> 
> 
>ServerName example
>ServerAlias example
>ServerAdmin exam...@example.com
> 
>DocumentRoot /var/www/example/static
>WSGIScriptAlias / /var/www/example/example/wsgi.py
>WSGIPythonPath  /var/www/example
>
>
>   Order allow,deny
>   Allow from all
>
>
> 
>Alias /head.jpg  /var/www/example/static/head.jpg
>Alias /media/ /var/www/example/uploads
>Alias /static /var/www/example/static
> 
>
>Order deny,allow
>Allow from all
>
> 
>   
>   Order deny,allow
>   Allow from all
>   
> 
>   ErrorLog /var/www/python_ng/logs/error.log
>   CustomLog /var/www/python_ng/logs/access.log combined
> 
> 
> I got a 'WSGIPythonPath cannot be in virtual host section' error.
> I have searched for previous topics but i have not been able to get a 
> solution, I would greatly appreciate any help.
> Thanks

The WSGIPyhtonPath must be moved outside of the 
configuration directive. I.e. it must be in the "root" of Apache
configuration. For example, this would work:

%
WSGIPythonPath  /var/www/example

   ServerName example
   ServerAlias example
   ServerAdmin exam...@example.com

   DocumentRoot /var/www/example/static
   WSGIScriptAlias / /var/www/example/example/wsgi.py
   
   
  Order allow,deny
  Allow from all
   
   

   Alias /head.jpg  /var/www/example/static/head.jpg
   Alias /media/ /var/www/example/uploads
   Alias /static /var/www/example/static

   
   Order deny,allow
   Allow from all
   

  
  Order deny,allow
  Allow from all
  

  ErrorLog /var/www/python_ng/logs/error.log
  CustomLog /var/www/python_ng/logs/access.log combined

%

Keep in mind that setting the path in this way means it gets set like
that for _all_ mod_wsgi apps you might have. Most people therefore use
a bit different solution where they set-up the Python path within the
wsgi.py instead (if you want to host multiple independent
Django projects).

Best regards

-- 
Branko Majic
Jabber: bra...@majic.rs
Please use only Free formats when sending attachments to me.

Бранко Мајић
Џабер: bra...@majic.rs
Молим вас да додатке шаљете искључиво у слободним форматима.


signature.asc
Description: PGP signature


Django and apache

2013-05-12 Thread Stanley Agba
Hello guys, 
please I'm kind of a noob at django and I'm trying to deploy a django site 
on Apache with mod_wsgi, I am not using a virtualenv as the server has 
python installed.
I added the following to my /etc/apache2/apache2.conf 


   ServerName example
   ServerAlias example
   ServerAdmin exam...@example.com

   DocumentRoot /var/www/example/static
   WSGIScriptAlias / /var/www/example/example/wsgi.py
   WSGIPythonPath  /var/www/example
   
   
  Order allow,deny
  Allow from all
   
   

   Alias /head.jpg  /var/www/example/static/head.jpg
   Alias /media/ /var/www/example/uploads
   Alias /static /var/www/example/static

   
   Order deny,allow
   Allow from all
   

  
  Order deny,allow
  Allow from all
  

  ErrorLog /var/www/python_ng/logs/error.log
  CustomLog /var/www/python_ng/logs/access.log combined


I got a 'WSGIPythonPath cannot be in virtual host section' error.
I have searched for previous topics but i have not been able to get a 
solution, I would greatly appreciate any help.
Thanks

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Cal Leeming [Simplicity Media Ltd]
Just to chime in on this..

In terms of commercial options, we have sometimes gone with ZXTM (now known
as StingRay Traffic Manager) , it has some truly amazing features and you
should definitely check it out. I believe that RiverBed have since started
issuing free commercial licences for up to a certain traffic rate, and it's
a downloadable package/virtual appliance.

We also often use the load balancers that come with Rackspace Cloud, they
have proven to be quite efficient. When using this route, we also tend to
throw everything in front of CloudFlare too (if you haven't seen this
already, check it out. It is free for non SSL usage too!)

In a nut shell;

* ZXTM - commercial (free licence to a certain amount), amazing traffic
script language, self hosted
* Rackspace Cloud - does what it says on the tin, no traffic scripting
* F5 - commercial, not had any personal experience with it (but one of our
providers uses it as a shared load balancer for their customers and it's
been stable)
* haproxy - works, but it can be a pita!
* CloudFlare - this isn't a load balancer, but does give you much better
control over DNS (it proxies your site, and effectively makes 'DNS changes'
instant)

I believe uWSGI has some really good load balancing features too, but I
haven't used them in too much depth yet (despite being an avid user of
uWSGI for 2-3 years!)

Hope this helps

Cal

On Tue, Oct 30, 2012 at 8:14 AM, Kurtis Mullins wrote:

> The easiest thing I've found to use is simply uWSGI with Nginx. It's easy
> to just create new Django servers on the fly. You simply include the IPs in
> a list and it will use various algorithms (optional) to distribute the
> requests appropriately.
>
> As a lot of applications are IO bound, you could also use a distributed
> database system to help with your scalability. I don't have much experience
> in that area, though.
>
> This still leaves a point of failure: Nginx (or whatever load balancer or
> reverse proxy you use). Maybe someone else here will know more about load
> balancing Nginx itself ... that might require specialized hardware. I know
> a lot of cloud services offer load balancers (e.g. rackspace) so you could
> possibly use that with multiple nginx servers and further multiple django
> servers.
>
>
> On Tue, Oct 30, 2012 at 3:42 AM, Isaac XXX  wrote:
>
>> Hi there,
>>
>> maybe you're right, but I'm not really worried about RAM footprint, or
>> resources consumption. I'm concerned now on architecture, setting a right
>> scalable system, and a right cluster of systems, without lacks of
>> communications between them.
>>
>> Underlaying technologies can be easily replaced (say apache-mod_wsgi for
>> gunicorn or uwsgi), and some performance improvements can be made, but this
>> is not what I'm looking for. I'm looking for the tools to generate a robust
>> system, balancing requests through several systems, and allowing increase
>> the size of this system (adding more servers) without trouble.
>>
>> Cheers,
>>
>> Isaac
>>
>>
>> On 10/29/2012 05:18 PM, Some Developer wrote:
>>
>>> On 29/10/2012 16:03, Isaac XXX wrote:
>>>
 Hi there,

 thank you for response Tom.

 Actually, I've a complete idea at how to build this system, but I lack
 the exact information about how to join systems, and what I was looking for
 was a source of cohesive information on all systems. At least, when I
 finish to build that system, I will write this tutorial.

 For someone who can help me, I will describe here what I thought it can
 be this structure:

 - 1 nginx, as a reverse proxy on frontend, serving static/media and
 redirecting content to apache clusters
 - n apache servers, with mod_wsgi, serving dynamic data
 - m postgresql servers, in a master-slave flavour

 Cheers,

 Isaac

>>>
>>> Why not just ditch Apache entirely and just use Nginx for serving all
>>> media (both static and dynamic)? You can then save quite a few resources as
>>> you only need to run one HTTP server rather than two.
>>>
>>> Using Nginx to serve Django content works well. Just serve your Django
>>> application via FastCGI or uWSGI and you'll significantly simplify your
>>> configuration and reduce RAM usage on your servers as well.
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to django-users+unsubscribe@**
>> googlegroups.com .
>> For more options, visit this group at http://groups.google.com/**
>> group/django-users?hl=en
>> .
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To 

Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Tom Evans
On Tue, Oct 30, 2012 at 7:35 AM, Isaac XXX  wrote:
> Hi Tom,
>
> you're right, I was not really explicit about what were my lacks of
> information. Right now, the following points are the ones I can't found a
> howto for the desired deployment:
>
> - Create a master-slave system on postgresql, maintaining all systems up to
> date, distributing reads, and centralizing writes
> - How to configure a cluster of reverse proxies (a single reverse proxy can
> not be enought, and I need to plan to deploy more than 1 load balancers)
>
> The rest (configure apache with mod_wsgit, configure nginx to serve static
> content and so on), is now solved on my current deployments, so it should
> not be a problem on a distributed environment.
>
> Cheers,
>
> Isaac
>

Hi Isaac

We use a similar setup at $JOB. We run a pair of apache httpd servers,
which serve static content and reverse proxy to other http servers
(usually apache again, sometimes not) for dynamic content. The
requests are distributed evenly between the two proxies by our
routers, which round robin connections between the two of them. This
is basically your setup, but we use Apache, because we know it and can
tune it to give nginx like performance anyway.

Actually, that's only half of it - each proxy has all of the public
IPs we serve allocated on lo0 (loopback), and the requests are round
robin routed via a pair of high availability addresses. Therefore, on
both boxes, apache listens on the 'right' IPs. If we ever want to run
with just one proxy, we can 'down' one of the HA addresses on the
server we wish to update, which moves that HA address to be active on
the other proxy, which then serves all the requests.

Now, did we need to do any of this? Probably not! We serve in the
region of 3-5 million requests a day, with peaks of around 200
concurrent requests/s going through the proxies. Apache uses in total
500MB of RAM, pre-tuned to serve up to 768 concurrent req/s without
requiring extra resources. Load average on the boxes never goes above
0.05, even if we put all the requests through one machine. It's nice
having a spare for such a critical part of infrastructure though.

pgsql scaling is a little more involved than MySQL, which is what
we've always used here - usually because it's replication systems are
so good. You will typically need to use some external software to
manage the replication, eg Slony, but don't take my word for it, very
limited pgsql experience.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Kurtis Mullins
The easiest thing I've found to use is simply uWSGI with Nginx. It's easy
to just create new Django servers on the fly. You simply include the IPs in
a list and it will use various algorithms (optional) to distribute the
requests appropriately.

As a lot of applications are IO bound, you could also use a distributed
database system to help with your scalability. I don't have much experience
in that area, though.

This still leaves a point of failure: Nginx (or whatever load balancer or
reverse proxy you use). Maybe someone else here will know more about load
balancing Nginx itself ... that might require specialized hardware. I know
a lot of cloud services offer load balancers (e.g. rackspace) so you could
possibly use that with multiple nginx servers and further multiple django
servers.

On Tue, Oct 30, 2012 at 3:42 AM, Isaac XXX  wrote:

> Hi there,
>
> maybe you're right, but I'm not really worried about RAM footprint, or
> resources consumption. I'm concerned now on architecture, setting a right
> scalable system, and a right cluster of systems, without lacks of
> communications between them.
>
> Underlaying technologies can be easily replaced (say apache-mod_wsgi for
> gunicorn or uwsgi), and some performance improvements can be made, but this
> is not what I'm looking for. I'm looking for the tools to generate a robust
> system, balancing requests through several systems, and allowing increase
> the size of this system (adding more servers) without trouble.
>
> Cheers,
>
> Isaac
>
>
> On 10/29/2012 05:18 PM, Some Developer wrote:
>
>> On 29/10/2012 16:03, Isaac XXX wrote:
>>
>>> Hi there,
>>>
>>> thank you for response Tom.
>>>
>>> Actually, I've a complete idea at how to build this system, but I lack
>>> the exact information about how to join systems, and what I was looking for
>>> was a source of cohesive information on all systems. At least, when I
>>> finish to build that system, I will write this tutorial.
>>>
>>> For someone who can help me, I will describe here what I thought it can
>>> be this structure:
>>>
>>> - 1 nginx, as a reverse proxy on frontend, serving static/media and
>>> redirecting content to apache clusters
>>> - n apache servers, with mod_wsgi, serving dynamic data
>>> - m postgresql servers, in a master-slave flavour
>>>
>>> Cheers,
>>>
>>> Isaac
>>>
>>
>> Why not just ditch Apache entirely and just use Nginx for serving all
>> media (both static and dynamic)? You can then save quite a few resources as
>> you only need to run one HTTP server rather than two.
>>
>> Using Nginx to serve Django content works well. Just serve your Django
>> application via FastCGI or uWSGI and you'll significantly simplify your
>> configuration and reduce RAM usage on your servers as well.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Isaac XXX

Hi there,

maybe you're right, but I'm not really worried about RAM footprint, or 
resources consumption. I'm concerned now on architecture, setting a 
right scalable system, and a right cluster of systems, without lacks of 
communications between them.


Underlaying technologies can be easily replaced (say apache-mod_wsgi for 
gunicorn or uwsgi), and some performance improvements can be made, but 
this is not what I'm looking for. I'm looking for the tools to generate 
a robust system, balancing requests through several systems, and 
allowing increase the size of this system (adding more servers) without 
trouble.


Cheers,

Isaac

On 10/29/2012 05:18 PM, Some Developer wrote:

On 29/10/2012 16:03, Isaac XXX wrote:

Hi there,

thank you for response Tom.

Actually, I've a complete idea at how to build this system, but I 
lack the exact information about how to join systems, and what I was 
looking for was a source of cohesive information on all systems. At 
least, when I finish to build that system, I will write this tutorial.


For someone who can help me, I will describe here what I thought it 
can be this structure:


- 1 nginx, as a reverse proxy on frontend, serving static/media and 
redirecting content to apache clusters

- n apache servers, with mod_wsgi, serving dynamic data
- m postgresql servers, in a master-slave flavour

Cheers,

Isaac


Why not just ditch Apache entirely and just use Nginx for serving all 
media (both static and dynamic)? You can then save quite a few 
resources as you only need to run one HTTP server rather than two.


Using Nginx to serve Django content works well. Just serve your Django 
application via FastCGI or uWSGI and you'll significantly simplify 
your configuration and reduce RAM usage on your servers as well.




--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Isaac XXX
Thank you so much for tips. I will keep them when I start to test 
environment for performance.


Cheers

Isaac

On 10/29/2012 06:44 PM, Cal Leeming [Simplicity Media Ltd] wrote:

Hi Isaac,

If there is one thing I have learnt about scaling apps, it's about 
trying things out for yourself.


Sure there are some best practice guidelines (i.e. serving files from 
nginx, or using apache's X-SendFile rather than streaming out via the 
webapp), but if someone comes along and tells you to use X instead of 
Y, then you don't get the advantages of learning "the hard way".


Another important note is that scaling rarely goes up on a 1:1 ratio, 
i.e. the configuration and resources required to handle X number of 
requests/sec, may be completely different if you need to handle Y 
number of requests/sec.


And often what works for one person, won't work for another (scaling 
is entirely dependant on your application, despite what any of these 
cloud providers might tell you!)


In my own experience, I've found that;

* SSDs with Percona MySQL, resolves a LOT of performance problems - 
but don't abuse it

* Lots and lots and lots of query tuning and InnoDB tuning
* New Relic to identify bottlenecks
* IO contention is a big thing
* Snowball prevention (i.e. you set max clients to X, your backend 
can't handle it, your requests stack up, the load balancer forces time 
out, and your database gets smashed - or you set max memory too high, 
server goes into swap etc).

* uWSGI + nginx is amazing
* Identify where your bottlenecks are (in my own experience, IO/memory 
tends to come up more often than CPU)


Sadly I haven't tried PSQL so I can't offer any advice on this - 
Percona are dragging MySQL kicking and screaming into the 21st century 
and really doing some amazing things, but it's by no means perfect!


The above has helped us grow past 8k-12k requests/minute, the largest 
database we manage is around 1.1 billion rows weighing in at 160GB+, 
and we maintain around 60+ servers.


I should reiterate, the above is purely based on my own experience and 
use cases - I am by no means an expert on the subject and I'm still 
learning approaches on a daily basis - so this is really meant as 
"food for thought" rather than a "this is how you should do things".


Hope this helps a bit!

Cal

On Mon, Oct 29, 2012 at 2:42 PM, Isaac XXX > wrote:


Hi folks,

I'm developing a new application that should get high traffic.
Right now, I've other projects with the follow architecture:

Nginx on front: serving static content and redirecting to apache
for dynamic data
Apache+mod_wsgi: serving dynamic pages
PostgreSQL: backend for data storage (RDBM)
Memcache: for caching purposes :)

All my deployments use a single server, with single
frontend/backend (1 nginx, 1 apache, 1 postgresql). The
requirements for this new project are really large, and I think I
will need to scale all system. Can anyone suggest me an all-in-one
tutorial, discussing the main points on scale a system?

I know there are different alternatives for DB (master-slave,
clustering...), nginx can serve as a reverse proxy or not... and I
need to merge all this information in a single scalable system,
but I can't find an unified source of information.

Can anyone help me on it?

-- 
You received this message because you are subscribed to the Google

Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.


--
You received this message because you are subscribed to the Google 
Groups "Django users" group.

To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Isaac XXX

Hi Tom,

you're right, I was not really explicit about what were my lacks of 
information. Right now, the following points are the ones I can't found 
a howto for the desired deployment:


- Create a master-slave system on postgresql, maintaining all systems up 
to date, distributing reads, and centralizing writes
- How to configure a cluster of reverse proxies (a single reverse proxy 
can not be enought, and I need to plan to deploy more than 1 load balancers)


The rest (configure apache with mod_wsgit, configure nginx to serve 
static content and so on), is now solved on my current deployments, so 
it should not be a problem on a distributed environment.


Cheers,

Isaac

On 10/29/2012 05:23 PM, Tom Evans wrote:

On Mon, Oct 29, 2012 at 4:03 PM, Isaac XXX <vyrp...@gmail.com> wrote:

Hi there,

thank you for response Tom.

Actually, I've a complete idea at how to build this system, but I lack the
exact information about how to join systems, and what I was looking for was
a source of cohesive information on all systems. At least, when I finish to
build that system, I will write this tutorial.

For someone who can help me, I will describe here what I thought it can be
this structure:

- 1 nginx, as a reverse proxy on frontend, serving static/media and
redirecting content to apache clusters
- n apache servers, with mod_wsgi, serving dynamic data
- m postgresql servers, in a master-slave flavour

Cheers,

Isaac


I'm confused about what you are confused about - you seem to grasp
precisely what is required.

IE, which of the following Qs are you stuck at:

How to configure nginx to reverse proxy and balance to other http servers?
How to configure apache, mod_wsgi and django?
How to configure pgsql in a master/multiple slave environment?
How to configure django to issue write requests to the write master,
and distribute reads to read-only slaves?


Cheers

Tom



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-29 Thread Kurtis Mullins
The old rule of thumb is to avoid premature optimization. I'd build,
profile, then scale or otherwise optimize as needed. This isn't a tutorial
or really a discussion on all points of scaling a system; but identifying
bottle necks will do wonders when it comes to deciding what, where, and how
to scale. Good luck!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-29 Thread Cal Leeming [Simplicity Media Ltd]
Hi Isaac,

If there is one thing I have learnt about scaling apps, it's about trying
things out for yourself.

Sure there are some best practice guidelines (i.e. serving files from
nginx, or using apache's X-SendFile rather than streaming out via the
webapp), but if someone comes along and tells you to use X instead of Y,
then you don't get the advantages of learning "the hard way".

Another important note is that scaling rarely goes up on a 1:1 ratio, i.e.
the configuration and resources required to handle X number of
requests/sec, may be completely different if you need to handle Y number of
requests/sec.

And often what works for one person, won't work for another (scaling is
entirely dependant on your application, despite what any of these cloud
providers might tell you!)

In my own experience, I've found that;

* SSDs with Percona MySQL, resolves a LOT of performance problems - but
don't abuse it
* Lots and lots and lots of query tuning and InnoDB tuning
* New Relic to identify bottlenecks
* IO contention is a big thing
* Snowball prevention (i.e. you set max clients to X, your backend can't
handle it, your requests stack up, the load balancer forces time out, and
your database gets smashed - or you set max memory too high, server goes
into swap etc).
* uWSGI + nginx is amazing
* Identify where your bottlenecks are (in my own experience, IO/memory
tends to come up more often than CPU)

Sadly I haven't tried PSQL so I can't offer any advice on this - Percona
are dragging MySQL kicking and screaming into the 21st century and really
doing some amazing things, but it's by no means perfect!

The above has helped us grow past 8k-12k requests/minute, the largest
database we manage is around 1.1 billion rows weighing in at 160GB+, and we
maintain around 60+ servers.

I should reiterate, the above is purely based on my own experience and use
cases - I am by no means an expert on the subject and I'm still learning
approaches on a daily basis - so this is really meant as "food for thought"
rather than a "this is how you should do things".

Hope this helps a bit!

Cal

On Mon, Oct 29, 2012 at 2:42 PM, Isaac XXX  wrote:

> Hi folks,
>
> I'm developing a new application that should get high traffic. Right now,
> I've other projects with the follow architecture:
>
> Nginx on front: serving static content and redirecting to apache for
> dynamic data
> Apache+mod_wsgi: serving dynamic pages
> PostgreSQL: backend for data storage (RDBM)
> Memcache: for caching purposes :)
>
> All my deployments use a single server, with single frontend/backend (1
> nginx, 1 apache, 1 postgresql). The requirements for this new project are
> really large, and I think I will need to scale all system. Can anyone
> suggest me an all-in-one tutorial, discussing the main points on scale a
> system?
>
> I know there are different alternatives for DB (master-slave,
> clustering...), nginx can serve as a reverse proxy or not... and I need to
> merge all this information in a single scalable system, but I can't find an
> unified source of information.
>
> Can anyone help me on it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-29 Thread Some Developer

On 29/10/2012 16:03, Isaac XXX wrote:

Hi there,

thank you for response Tom.

Actually, I've a complete idea at how to build this system, but I lack 
the exact information about how to join systems, and what I was 
looking for was a source of cohesive information on all systems. At 
least, when I finish to build that system, I will write this tutorial.


For someone who can help me, I will describe here what I thought it 
can be this structure:


- 1 nginx, as a reverse proxy on frontend, serving static/media and 
redirecting content to apache clusters

- n apache servers, with mod_wsgi, serving dynamic data
- m postgresql servers, in a master-slave flavour

Cheers,

Isaac


Why not just ditch Apache entirely and just use Nginx for serving all 
media (both static and dynamic)? You can then save quite a few resources 
as you only need to run one HTTP server rather than two.


Using Nginx to serve Django content works well. Just serve your Django 
application via FastCGI or uWSGI and you'll significantly simplify your 
configuration and reduce RAM usage on your servers as well.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-29 Thread Tom Evans
On Mon, Oct 29, 2012 at 4:03 PM, Isaac XXX <vyrp...@gmail.com> wrote:
> Hi there,
>
> thank you for response Tom.
>
> Actually, I've a complete idea at how to build this system, but I lack the
> exact information about how to join systems, and what I was looking for was
> a source of cohesive information on all systems. At least, when I finish to
> build that system, I will write this tutorial.
>
> For someone who can help me, I will describe here what I thought it can be
> this structure:
>
> - 1 nginx, as a reverse proxy on frontend, serving static/media and
> redirecting content to apache clusters
> - n apache servers, with mod_wsgi, serving dynamic data
> - m postgresql servers, in a master-slave flavour
>
> Cheers,
>
> Isaac
>

I'm confused about what you are confused about - you seem to grasp
precisely what is required.

IE, which of the following Qs are you stuck at:

How to configure nginx to reverse proxy and balance to other http servers?
How to configure apache, mod_wsgi and django?
How to configure pgsql in a master/multiple slave environment?
How to configure django to issue write requests to the write master,
and distribute reads to read-only slaves?


Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-29 Thread Isaac XXX

Hi there,

thank you for response Tom.

Actually, I've a complete idea at how to build this system, but I lack 
the exact information about how to join systems, and what I was looking 
for was a source of cohesive information on all systems. At least, when 
I finish to build that system, I will write this tutorial.


For someone who can help me, I will describe here what I thought it can 
be this structure:


- 1 nginx, as a reverse proxy on frontend, serving static/media and 
redirecting content to apache clusters

- n apache servers, with mod_wsgi, serving dynamic data
- m postgresql servers, in a master-slave flavour

Cheers,

Isaac

On 10/29/2012 04:23 PM, Tom Evans wrote:

On Mon, Oct 29, 2012 at 2:42 PM, Isaac XXX  wrote:

Hi folks,

I'm developing a new application that should get high traffic. Right now,
I've other projects with the follow architecture:

Nginx on front: serving static content and redirecting to apache for dynamic
data
Apache+mod_wsgi: serving dynamic pages
PostgreSQL: backend for data storage (RDBM)
Memcache: for caching purposes :)

All my deployments use a single server, with single frontend/backend (1
nginx, 1 apache, 1 postgresql). The requirements for this new project are
really large, and I think I will need to scale all system. Can anyone
suggest me an all-in-one tutorial, discussing the main points on scale a
system?

I know there are different alternatives for DB (master-slave,
clustering...), nginx can serve as a reverse proxy or not... and I need to
merge all this information in a single scalable system, but I can't find an
unified source of information.

Can anyone help me on it?


There is unlikely to be one authoritative source that will explain
precisely how to scale an app - part of this is it is domain specific
what "scale" and "app" mean!

So first off, "scale". You can scale up, or out. Scaling up means
running everything on faster hardware. Due to how IT progresses, every
18 months you can replace your server with something twice as fast.
Scale out means running everything over more boxes. Scale up is
trivial, just spend more money, scale out can be harder.

Most parts of the stack are easy to scale, because HTTP itself is
stateless and therefore easy to scale. Eg, if you have a nginx
frontend, serving static files and proxying to backend servers for
static content, and the nginx server is overloaded, it is easy to add
a balancer to route HTTP requests to multiple nginx servers.

The same is true for dynamic content - need more workers, add more
machines, and tell nginx to talk to more machines.

The only tricky aspect of scale out is database. Most databases do not
have a simple 'scale out' option. With postgres, you can setup
master-slave trees, but this only expands your read capacity, all
writes have to go through one server (and then all the slaves, making
it more expensive the more slaves you add).

The only true way of scaling out with database servers is to shard
your data, splitting it up by some arbitrary algorithm (usually on
user), but sharding isn't easy, you will have to design your database
and app around it. There are some very good videos, docs and talks
from the likes of Facebook and the like, sharding is not a panacea and
requires a lot of work.

Cheers

Tom



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-29 Thread Tom Evans
On Mon, Oct 29, 2012 at 2:42 PM, Isaac XXX  wrote:
> Hi folks,
>
> I'm developing a new application that should get high traffic. Right now,
> I've other projects with the follow architecture:
>
> Nginx on front: serving static content and redirecting to apache for dynamic
> data
> Apache+mod_wsgi: serving dynamic pages
> PostgreSQL: backend for data storage (RDBM)
> Memcache: for caching purposes :)
>
> All my deployments use a single server, with single frontend/backend (1
> nginx, 1 apache, 1 postgresql). The requirements for this new project are
> really large, and I think I will need to scale all system. Can anyone
> suggest me an all-in-one tutorial, discussing the main points on scale a
> system?
>
> I know there are different alternatives for DB (master-slave,
> clustering...), nginx can serve as a reverse proxy or not... and I need to
> merge all this information in a single scalable system, but I can't find an
> unified source of information.
>
> Can anyone help me on it?
>

There is unlikely to be one authoritative source that will explain
precisely how to scale an app - part of this is it is domain specific
what "scale" and "app" mean!

So first off, "scale". You can scale up, or out. Scaling up means
running everything on faster hardware. Due to how IT progresses, every
18 months you can replace your server with something twice as fast.
Scale out means running everything over more boxes. Scale up is
trivial, just spend more money, scale out can be harder.

Most parts of the stack are easy to scale, because HTTP itself is
stateless and therefore easy to scale. Eg, if you have a nginx
frontend, serving static files and proxying to backend servers for
static content, and the nginx server is overloaded, it is easy to add
a balancer to route HTTP requests to multiple nginx servers.

The same is true for dynamic content - need more workers, add more
machines, and tell nginx to talk to more machines.

The only tricky aspect of scale out is database. Most databases do not
have a simple 'scale out' option. With postgres, you can setup
master-slave trees, but this only expands your read capacity, all
writes have to go through one server (and then all the slaves, making
it more expensive the more slaves you add).

The only true way of scaling out with database servers is to shard
your data, splitting it up by some arbitrary algorithm (usually on
user), but sharding isn't easy, you will have to design your database
and app around it. There are some very good videos, docs and talks
from the likes of Facebook and the like, sharding is not a panacea and
requires a lot of work.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-29 Thread Isaac XXX

Hi folks,

I'm developing a new application that should get high traffic. Right 
now, I've other projects with the follow architecture:


Nginx on front: serving static content and redirecting to apache for 
dynamic data

Apache+mod_wsgi: serving dynamic pages
PostgreSQL: backend for data storage (RDBM)
Memcache: for caching purposes :)

All my deployments use a single server, with single frontend/backend (1 
nginx, 1 apache, 1 postgresql). The requirements for this new project 
are really large, and I think I will need to scale all system. Can 
anyone suggest me an all-in-one tutorial, discussing the main points on 
scale a system?


I know there are different alternatives for DB (master-slave, 
clustering...), nginx can serve as a reverse proxy or not... and I need 
to merge all this information in a single scalable system, but I can't 
find an unified source of information.


Can anyone help me on it?

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Question in document "How to use Django with Apache and mod_wsgi"

2012-10-18 Thread Tomas Ehrlich
Hello,
sometimes I have similar problem. Usually helps clear cache or reload page 
(using F5). I'm still not sure why that happens, since both develop and 
production versions run on different domains (localhost:8000 and mysite.com).

If admin site have proper css style and only images are missing, I don't have a 
clue what cause it.


Cheers,
 Tom


Dne Fri, 19 Oct 2012 10:02:25 +0800
"Dae James" <daeda...@126.com> napsal(a):

> Thank you. Yes, I didn't set "Alias /static/ /path/to/mysite.com/static/" in 
> my site config. 
> However, when I set that alias, I met another problem as the following 
> picture. As the picture, my models don't have "Add" and "Change" button, 
> which they have when I run this site on development server or when I just set 
> DEBUG in settings.py to True.
>  
> 
> 
> 
> 
> Dae James
> 
> From: Tomas Ehrlich
> Date: 2012-10-19 00:48
> To: django-users
> Subject: Re: Question in document "How to use Django with Apache and mod_wsgi"
> Hello,
> have you set proper aliases in apache site config?
> 
> Alias /robots.txt /path/to/mysite.com/static/robots.txt
> Alias /favicon.ico /path/to/mysite.com/static/favicon.ico
> 
> AliasMatch ^/([^/]*\.css) /path/to/mysite.com/static/styles/$1
> 
> Alias /media/ /path/to/mysite.com/media/
> Alias /static/ /path/to/mysite.com/static/
> 
> 
> Order deny,allow
> Allow from all
> 
> 
> 
> Order deny,allow
> Allow from all
> 
> 
> or similar. Check that apache can read
> directories /path/to/mysite.com/{static,media} ...
> 
> You should have appropriate settings in your settings.py, eg.
> 
> MEDIA_URL = '/media/'
> STATIC_URL = '/static/'
> 
> MEDIA_ROOT and STATIC_ROOT aren't important in this case.
> 
> Then, take a look at you access.log, if there is something relevant.
> 
> Does it works now? If no, please send your settings.py and apache site
> config file. (Don't forget to delete sensitive data from settings.py
> before posting here).
> 
> Cheers,
>  Tom
> 
> 
> Dne Thu, 18 Oct 2012 06:39:13 -0700 (PDT)
> Dae_James <daeda...@126.com> napsal(a):
> 
> > The url of the document is: 
> > https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/
> > I can't succeed at the last part, "Serving the admin files".  My admin page 
> > is as follows.
> > 
> > <https://lh3.googleusercontent.com/-JvizcFwx52s/UIADfuCY-UI/AAM/59oDrVVuHzA/s1600/Untitled20121018212559.png>
> > I have tried two ways. However both can't succeed.
> > First means is as the following steps:
> > 1, Activate the admin site following 
> > https://docs.djangoproject.com/en/1.4/intro/tutorial02/
> > 2, Execute "manage.py collectstatic" in console.
> > 3, Start mob_wsgi.
> > 
> > Second means is as the following steps:
> > 1, Activate the admin site following 
> > https://docs.djangoproject.com/en/1.4/intro/tutorial02/
> > 2, Copy the admin files live in (django/contrib/admin/static/admin) into my 
> > Apache document root(C:\Program Files\Apache Software 
> > Foundation\Apache2.2\htdocs)
> > 3, Start mob_wsgi
> > 
> > Help, please! Thank you~~
> > 
> 



S pozdravem
  Tomáš Ehrlich

Email:  tomas.ehrl...@gmail.com
Tel:+420 608 219 889
Jabber: elv...@jabber.cz

"Půjdu kamkoliv, pokud je to kupředu." - J. London

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Re: Question in document "How to use Django with Apache and mod_wsgi"

2012-10-18 Thread Dae James
Thank you. Yes, I didn't set "Alias /static/ /path/to/mysite.com/static/" in my 
site config. 
However, when I set that alias, I met another problem as the following picture. 
As the picture, my models don't have "Add" and "Change" button, which they have 
when I run this site on development server or when I just set DEBUG in 
settings.py to True.
 




Dae James

From: Tomas Ehrlich
Date: 2012-10-19 00:48
To: django-users
Subject: Re: Question in document "How to use Django with Apache and mod_wsgi"
Hello,
have you set proper aliases in apache site config?

Alias /robots.txt /path/to/mysite.com/static/robots.txt
Alias /favicon.ico /path/to/mysite.com/static/favicon.ico

AliasMatch ^/([^/]*\.css) /path/to/mysite.com/static/styles/$1

Alias /media/ /path/to/mysite.com/media/
Alias /static/ /path/to/mysite.com/static/


Order deny,allow
Allow from all



Order deny,allow
Allow from all


or similar. Check that apache can read
directories /path/to/mysite.com/{static,media} ...

You should have appropriate settings in your settings.py, eg.

MEDIA_URL = '/media/'
STATIC_URL = '/static/'

MEDIA_ROOT and STATIC_ROOT aren't important in this case.

Then, take a look at you access.log, if there is something relevant.

Does it works now? If no, please send your settings.py and apache site
config file. (Don't forget to delete sensitive data from settings.py
before posting here).

Cheers,
 Tom


Dne Thu, 18 Oct 2012 06:39:13 -0700 (PDT)
Dae_James <daeda...@126.com> napsal(a):

> The url of the document is: 
> https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/
> I can't succeed at the last part, "Serving the admin files".  My admin page 
> is as follows.
> 
> <https://lh3.googleusercontent.com/-JvizcFwx52s/UIADfuCY-UI/AAM/59oDrVVuHzA/s1600/Untitled20121018212559.png>
> I have tried two ways. However both can't succeed.
> First means is as the following steps:
> 1, Activate the admin site following 
> https://docs.djangoproject.com/en/1.4/intro/tutorial02/
> 2, Execute "manage.py collectstatic" in console.
> 3, Start mob_wsgi.
> 
> Second means is as the following steps:
> 1, Activate the admin site following 
> https://docs.djangoproject.com/en/1.4/intro/tutorial02/
> 2, Copy the admin files live in (django/contrib/admin/static/admin) into my 
> Apache document root(C:\Program Files\Apache Software 
> Foundation\Apache2.2\htdocs)
> 3, Start mob_wsgi
> 
> Help, please! Thank you~~
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

<>

Re: Question in document "How to use Django with Apache and mod_wsgi"

2012-10-18 Thread Tomas Ehrlich
Hello,
have you set proper aliases in apache site config?

Alias /robots.txt /path/to/mysite.com/static/robots.txt
Alias /favicon.ico /path/to/mysite.com/static/favicon.ico

AliasMatch ^/([^/]*\.css) /path/to/mysite.com/static/styles/$1

Alias /media/ /path/to/mysite.com/media/
Alias /static/ /path/to/mysite.com/static/


Order deny,allow
Allow from all



Order deny,allow
Allow from all


or similar. Check that apache can read
directories /path/to/mysite.com/{static,media} ...

You should have appropriate settings in your settings.py, eg.

MEDIA_URL = '/media/'
STATIC_URL = '/static/'

MEDIA_ROOT and STATIC_ROOT aren't important in this case.

Then, take a look at you access.log, if there is something relevant.

Does it works now? If no, please send your settings.py and apache site
config file. (Don't forget to delete sensitive data from settings.py
before posting here).

Cheers,
 Tom


Dne Thu, 18 Oct 2012 06:39:13 -0700 (PDT)
Dae_James  napsal(a):

> The url of the document is: 
> https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/
> I can't succeed at the last part, "Serving the admin files".  My admin page 
> is as follows.
> 
> 
> I have tried two ways. However both can't succeed.
> First means is as the following steps:
> 1, Activate the admin site following 
> https://docs.djangoproject.com/en/1.4/intro/tutorial02/
> 2, Execute "manage.py collectstatic" in console.
> 3, Start mob_wsgi.
> 
> Second means is as the following steps:
> 1, Activate the admin site following 
> https://docs.djangoproject.com/en/1.4/intro/tutorial02/
> 2, Copy the admin files live in (django/contrib/admin/static/admin) into my 
> Apache document root(C:\Program Files\Apache Software 
> Foundation\Apache2.2\htdocs)
> 3, Start mob_wsgi
> 
> Help, please! Thank you~~
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Question in document "How to use Django with Apache and mod_wsgi"

2012-10-18 Thread Dae_James
The url of the document is: 
https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/
I can't succeed at the last part, "Serving the admin files".  My admin page 
is as follows.


I have tried two ways. However both can't succeed.
First means is as the following steps:
1, Activate the admin site following 
https://docs.djangoproject.com/en/1.4/intro/tutorial02/
2, Execute "manage.py collectstatic" in console.
3, Start mob_wsgi.

Second means is as the following steps:
1, Activate the admin site following 
https://docs.djangoproject.com/en/1.4/intro/tutorial02/
2, Copy the admin files live in (django/contrib/admin/static/admin) into my 
Apache document root(C:\Program Files\Apache Software 
Foundation\Apache2.2\htdocs)
3, Start mob_wsgi

Help, please! Thank you~~

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/DW4WAIs5OmEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to use Django with Apache and mod_wsgi

2012-08-23 Thread Joris


Op woensdag 22 augustus 2012 23:05:03 UTC+2 schreef stikic het volgende:
>
> Then do I have to delete 00_default_vhost.conf file?
> What name can I give to this new created file? 
>
> Well you have not referred or included 00_default_vhost.conf in your 
httpd.conf so this file is not actually read by the web server! This is 
confirmed in your output of apache2ctl -S. 
Together with the observation that there is no "NameVirtualHost" OR a 
"DocumentRoot"  directive in the httpd.conf you supplied, suggests you 
either are not supplying us with all the config info you have OR you have a 
really weird apache set up. Anyway, your issue is clearly with Apache and 
not Django, so it  may be better if you ask these questions in a dedicated 
forum.

jb

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/0jfFwWZsQckJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to use Django with Apache and mod_wsgi

2012-08-22 Thread Seyfullah Tıkıç
Then do I have to delete 00_default_vhost.conf file?
What name can I give to this new created file?

2012/8/20 Joseph Mutumi <jjmut...@gmail.com>

> You would be good to organize your configuration. Try creating a file
> under /etc/apache2/vhosts.d/
> Probably my_domain.com (substitute my_domain.com with your actual domain).
>
> And move all the configuration to it:
> 
> ServerAdmin webmaster@my_domain.com
> DocumentRoot /usr/local/django/mysite/media/
> ServerName my_domain.com
> ServerAlias www.my_domain.com
>
> #WSGIDaemonProcess site-1 user=user-1 group=user-1 threads=25
> #WSGIProcessGroup site-1
>
> Alias /media/ /usr/local/django/mysite/media/
>
> 
> Order deny,allow
> Allow from all
>     
>
> WSGIScriptAlias / /home/seyfullah/django/mysite/apache/django.wsgi
>
> 
> Order deny,allow
> Allow from all
> 
>
> 
>
> You can remove the comments after you are sure its working
>
> Regards
>
>
> On Mon, Aug 20, 2012 at 2:39 PM, Joris <joris.bensc...@gmail.com> wrote:
>
>> The DocumentRoot directive is missing from the httpd.conf, indicating you
>> did not send all the required data. This may be because your attachment is
>> incomplete:
>>
>> There is an include statement in your httpd.conf: "Include
>> /etc/apache2/conf.d/*.conf"
>> All files from that conf.d folder are also processed. Please look in
>> files located in  /etc/apache2/conf.d/ for anything useful. Especially
>> files that contain a documentroot directive
>>
>> Also, it may help if you post the output of
>> apachectl -S
>> (note: some distros want apache2ctl instead of apachectl)
>>
>> jb
>>
>>
>>
>> On Monday, August 20, 2012 11:30:49 AM UTC+2, stikic wrote:
>>
>>> httpd.conf file is in the attachment.
>>>
>>> 2012/8/20, Joseph Mutumi <jjmu...@gmail.com>:
>>> > Hello,
>>> >
>>> > Could you post the VirtualHost configuration for Apache?
>>> > That would greatly help us help you.
>>> >
>>> > Regards
>>> >
>>> > On Mon, Aug 20, 2012 at 12:30 AM, Seyfullah Tıkıç <sti...@gmail.com>
>>> wrote:
>>> >
>>> >> Hello,
>>> >>
>>> >> I read the article below.
>>> >> https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/
>>> >>
>>> >> But still http://localhost redirects to
>>> >> /var/www/localhost/htdocs/index.html.
>>> >> I want http://localhost/ redirescts to
>>> /home/seyfullah/django/mysite.
>>> >> How can I do this?
>>> >>
>>> >> --
>>> >> SEYFULLAH TIKIÇ
>>> >>
>>> >> --
>>> >> You received this message because you are subscribed to the Google
>>> Groups
>>> >> "Django users" group.
>>> >> To post to this group, send email to django...@googlegroups.com.
>>> >> To unsubscribe from this group, send email to
>>> >> django-users...@googlegroups.com.
>>> >> For more options, visit this group at
>>> >> http://groups.google.com/group/django-users?hl=en.
>>> >>
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups
>>> > "Django users" group.
>>> > To post to this group, send email to django...@googlegroups.com.
>>> > To unsubscribe from this group, send email to
>>> > django-users...@googlegroups.com.
>>> > For more options, visit this group at
>>> > http://groups.google.com/group/django-users?hl=en.
>>> >
>>> >
>>>
>>>
>>> --
>>> SEYFULLAH TIKIÇ
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/KkXJTQwbtYwJ.
>>
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
SEYFULLAH TIKIÇ

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to use Django with Apache and mod_wsgi

2012-08-22 Thread Seyfullah Tıkıç
I checked my file again, it is not incomplete.

There is no file in /etc/apache2/conf.d

Output of apachectl -S is as below. I actually uninstalled mod_python, I
want to use mod_wsgi only.
Syntax error on line 49 of /etc/apache2/modules.d/16_mod_python.conf:
Invalid command 'PythonHandler', perhaps misspelled or defined by a module
not included in the server configuration

line 49 of /etc/apache2/modules.d/16_mod_python.conf is as below, I don't
know why it causes an error.

PythonHandler django.core.handlers.modpython


2012/8/20 Joris 

> The DocumentRoot directive is missing from the httpd.conf, indicating you
> did not send all the required data. This may be because your attachment is
> incomplete:
>
> There is an include statement in your httpd.conf: "Include
> /etc/apache2/conf.d/*.conf"
> All files from that conf.d folder are also processed. Please look in files
> located in  /etc/apache2/conf.d/ for anything useful. Especially files that
> contain a documentroot directive
>
> Also, it may help if you post the output of
> apachectl -S
> (note: some distros want apache2ctl instead of apachectl)
>
> jb
>
>
>
> On Monday, August 20, 2012 11:30:49 AM UTC+2, stikic wrote:
>
>> httpd.conf file is in the attachment.
>>
>> 2012/8/20, Joseph Mutumi :
>> > Hello,
>> >
>> > Could you post the VirtualHost configuration for Apache?
>> > That would greatly help us help you.
>> >
>> > Regards
>> >
>> > On Mon, Aug 20, 2012 at 12:30 AM, Seyfullah Tıkıç 
>> wrote:
>> >
>> >> Hello,
>> >>
>> >> I read the article below.
>> >> https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/
>> >>
>> >> But still http://localhost redirects to
>> >> /var/www/localhost/htdocs/index.html.
>> >> I want http://localhost/ redirescts to /home/seyfullah/django/mysite.
>> >> How can I do this?
>> >>
>> >> --
>> >> SEYFULLAH TIKIÇ
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "Django users" group.
>> >> To post to this group, send email to django...@googlegroups.com.
>> >> To unsubscribe from this group, send email to
>> >> django-users...@googlegroups.com.
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/django-users?hl=en.
>> >>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Django users" group.
>> > To post to this group, send email to django...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>> >
>> >
>>
>>
>> --
>> SEYFULLAH TIKIÇ
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/KkXJTQwbtYwJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
SEYFULLAH TIKIÇ

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to use Django with Apache and mod_wsgi

2012-08-20 Thread Joseph Mutumi
You would be good to organize your configuration. Try creating a file under
/etc/apache2/vhosts.d/
Probably my_domain.com (substitute my_domain.com with your actual domain).

And move all the configuration to it:

ServerAdmin webmaster@my_domain.com
DocumentRoot /usr/local/django/mysite/media/
ServerName my_domain.com
ServerAlias www.my_domain.com

#WSGIDaemonProcess site-1 user=user-1 group=user-1 threads=25
#WSGIProcessGroup site-1

Alias /media/ /usr/local/django/mysite/media/


Order deny,allow
Allow from all


WSGIScriptAlias / /home/seyfullah/django/mysite/apache/django.wsgi


Order deny,allow
Allow from all




You can remove the comments after you are sure its working

Regards

On Mon, Aug 20, 2012 at 2:39 PM, Joris <joris.bensc...@gmail.com> wrote:

> The DocumentRoot directive is missing from the httpd.conf, indicating you
> did not send all the required data. This may be because your attachment is
> incomplete:
>
> There is an include statement in your httpd.conf: "Include
> /etc/apache2/conf.d/*.conf"
> All files from that conf.d folder are also processed. Please look in files
> located in  /etc/apache2/conf.d/ for anything useful. Especially files that
> contain a documentroot directive
>
> Also, it may help if you post the output of
> apachectl -S
> (note: some distros want apache2ctl instead of apachectl)
>
> jb
>
>
>
> On Monday, August 20, 2012 11:30:49 AM UTC+2, stikic wrote:
>
>> httpd.conf file is in the attachment.
>>
>> 2012/8/20, Joseph Mutumi <jjmu...@gmail.com>:
>> > Hello,
>> >
>> > Could you post the VirtualHost configuration for Apache?
>> > That would greatly help us help you.
>> >
>> > Regards
>> >
>> > On Mon, Aug 20, 2012 at 12:30 AM, Seyfullah Tıkıç <sti...@gmail.com>
>> wrote:
>> >
>> >> Hello,
>> >>
>> >> I read the article below.
>> >> https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/
>> >>
>> >> But still http://localhost redirects to
>> >> /var/www/localhost/htdocs/index.html.
>> >> I want http://localhost/ redirescts to /home/seyfullah/django/mysite.
>> >> How can I do this?
>> >>
>> >> --
>> >> SEYFULLAH TIKIÇ
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "Django users" group.
>> >> To post to this group, send email to django...@googlegroups.com.
>> >> To unsubscribe from this group, send email to
>> >> django-users...@googlegroups.com.
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/django-users?hl=en.
>> >>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Django users" group.
>> > To post to this group, send email to django...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>> >
>> >
>>
>>
>> --
>> SEYFULLAH TIKIÇ
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/KkXJTQwbtYwJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to use Django with Apache and mod_wsgi

2012-08-20 Thread Joris
The DocumentRoot directive is missing from the httpd.conf, indicating you 
did not send all the required data. This may be because your attachment is 
incomplete: 

There is an include statement in your httpd.conf: "Include 
/etc/apache2/conf.d/*.conf"
All files from that conf.d folder are also processed. Please look in files 
located in  /etc/apache2/conf.d/ for anything useful. Especially files that 
contain a documentroot directive

Also, it may help if you post the output of
apachectl -S 
(note: some distros want apache2ctl instead of apachectl)

jb



On Monday, August 20, 2012 11:30:49 AM UTC+2, stikic wrote:
>
> httpd.conf file is in the attachment. 
>
> 2012/8/20, Joseph Mutumi : 
> > Hello, 
> > 
> > Could you post the VirtualHost configuration for Apache? 
> > That would greatly help us help you. 
> > 
> > Regards 
> > 
> > On Mon, Aug 20, 2012 at 12:30 AM, Seyfullah Tıkıç 
> >  
> wrote: 
> > 
> >> Hello, 
> >> 
> >> I read the article below. 
> >> https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ 
> >> 
> >> But still http://localhost redirects to 
> >> /var/www/localhost/htdocs/index.html. 
> >> I want http://localhost/ redirescts to /home/seyfullah/django/mysite. 
> >> How can I do this? 
> >> 
> >> -- 
> >> SEYFULLAH TIKIÇ 
> >> 
> >> -- 
> >> You received this message because you are subscribed to the Google 
> Groups 
> >> "Django users" group. 
> >> To post to this group, send email to 
> >> django...@googlegroups.com. 
>
> >> To unsubscribe from this group, send email to 
> >> django-users...@googlegroups.com . 
> >> For more options, visit this group at 
> >> http://groups.google.com/group/django-users?hl=en. 
> >> 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Django users" group. 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > django-users...@googlegroups.com . 
> > For more options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en. 
> > 
> > 
>
>
> -- 
> SEYFULLAH TIKIÇ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/KkXJTQwbtYwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to use Django with Apache and mod_wsgi

2012-08-20 Thread Seyfullah Tıkıç
arance without changing any of the
# default HTTP_.html.var files by adding the line:
#
#   Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /var/www/localhost/error/include files and copying them to /your/includepath/
# even on a per-VirtualHost basis.  The default include files will display
# your Apache version number and your ServerAdmin email address regardless
# of the setting of ServerSignature.
#
# The internationalized error documents require mod_alias, mod_include
# and mod_negotiation.  To activate them, uncomment the following 30 lines.

#Alias /error/ "/var/www/localhost/error"
#
#
#AllowOverride None
#Options IncludesNoExec
#AddOutputFilter Includes html
#AddHandler type-map var
#Order allow,deny
#Allow from all
#LanguagePriority en cs de es fr it nl sv pt-br ro
#ForceLanguagePriority Prefer Fallback
#
#
#ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
#ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
#ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
#ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
#ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
#ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
#ErrorDocument 410 /error/HTTP_GONE.html.var
#ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
#ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
#ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
#ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
#ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
#ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
#ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
#ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
#ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
#ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var


#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash.  This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully

# Pardus VHosts
#
# For Pardus we include External Virtual Hosts Files.
# Please see /etc/apache2/vhosts.d/00_default_vhost.conf for the default virtual host.
#
Include /etc/apache2/vhosts.d/*.conf

WSGIDaemonProcess site-1 user=user-1 group=user-1 threads=25
WSGIProcessGroup site-1

Alias /media/ /usr/local/django/mysite/media/


Order deny,allow
Allow from all


WSGIScriptAlias / /home/seyfullah/django/mysite/apache/django.wsgi


Order deny,allow
Allow from all


Re: How to use Django with Apache and mod_wsgi

2012-08-19 Thread Joseph Mutumi
Hello,

Could you post the VirtualHost configuration for Apache?
That would greatly help us help you.

Regards

On Mon, Aug 20, 2012 at 12:30 AM, Seyfullah Tıkıç  wrote:

> Hello,
>
> I read the article below.
> https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/
>
> But still http://localhost redirects to
> /var/www/localhost/htdocs/index.html.
> I want http://localhost/ redirescts to /home/seyfullah/django/mysite.
> How can I do this?
>
> --
> SEYFULLAH TIKIÇ
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How to use Django with Apache and mod_wsgi

2012-08-19 Thread Seyfullah Tıkıç
Hello,

I read the article below.
https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/

But still http://localhost redirects to
/var/www/localhost/htdocs/index.html.
I want http://localhost/ redirescts to /home/seyfullah/django/mysite.
How can I do this?

-- 
SEYFULLAH TIKIÇ

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



  1   2   3   >