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.