Re: Issue with Python 3.6 and Django 2.0 App Deployment on Shared Hosting

2018-12-09 Thread Annchen Knodt
y. If you would like I would 
>>> be more than happy to send you any information you request that you think 
>>> may be helpful in resolving this. Again, Thank you for your time and help! 
>>> I greatly appreciate it!
>>>
>>> Best wishes!
>>>
>>> Corey
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Friday, January 5, 2018 at 4:59:24 PM UTC-6, Matthew Pava wrote:
>>>>
>>>> Looking at the .htaccess file and the example provided here:  
>>>> https://docs.djangoproject.com/en/1.8/howto/deployment/fastcgi/#running-django-on-a-shared-hosting-provider-with-apache
>>>>
>>>> It looks like you have a typo.
>>>>
>>>> AddHandler fastcgi-script .fcgi
>>>>
>>>> RewriteEngine *On*
>>>>
>>>> RewriteCond %{REQUEST_FILENAME} !-f
>>>>
>>>> RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]
>>>>
>>>>  
>>>>
>>>> In the RewriteRule line, you have a % instead of a $.
>>>>
>>>>  
>>>>
>>>> Also, your DJANGO_SETTINGS_MODULE doesn’t have your project name 
>>>> specified.
>>>>
>>>>  
>>>>
>>>> Granted, these examples are from Django 1.8.
>>>>
>>>>  
>>>>
>>>> *From:* django...@googlegroups.com [mailto:django...@googlegroups.com] *On 
>>>> Behalf Of *coreyj...@gmail.com
>>>> *Sent:* Friday, January 5, 2018 3:01 PM
>>>> *To:* Django users
>>>> *Subject:* Re: Issue with Python 3.6 and Django 2.0 App Deployment on 
>>>> Shared Hosting
>>>>
>>>>  
>>>>
>>>> Hi! I am having the same problem. Did you get this to work yet? Any 
>>>> tips would be greatly appreciated:
>>>>
>>>>  
>>>>
>>>> I am using a shared server, linux, Django 2.0, Python 3.6.4, flup6. 
>>>> Because fastcgi is deprecated post Django 1.8 and Bluehost doesn't use 
>>>> WSGI 
>>>> and only FastCGI (mod_fastcgi) I am using what NetAngels made available: 
>>>> https://github.com/NetAngels/django-fastcgi
>>>>
>>>> My .htaccess file is the project folder with my .fcgi file as is 
>>>> commonly recommended. My .htaccess reads:
>>>>
>>>> AddHandler fastcgi-script.fcgi
>>>>
>>>> RewriteEngine On
>>>>
>>>> RewriteCond %{REQUEST_FILENAME} !-f
>>>>
>>>> RewriteRule ^(.*)% app.fcgi/$1 [QSA, L]
>>>>
>>>> My .fcgi file reads:
>>>>
>>>> #!/homeX/user/python3.6/bin/python36
>>>>
>>>> import sys, os
>>>>
>>>> project_name = "app"
>>>>
>>>> sys.path.insert(0, "homeX/user/python3.6/bin/python36")
>>>>
>>>> sys.path.append("directory/of/my/project/app")
>>>>
>>>> sys.path.append("directory/of/my/project/app/app")
>>>>
>>>> sys.path.append("directory/of/my/project/app/app/app")
>>>>
>>>> sys.path.append("directory/of/site-packages")
>>>>
>>>> sys.path.append("directory/of/site-packages/flup")
>>>>
>>>> sys.path.append("directory/of/site-packages/django")  
>>>>
>>>> os.chdir("directory/of/my/project/app/app/app")
>>>>
>>>>  
>>>>
>>>> os.environ['DJANGO_SETTINGS_MODULE'] = "settings"
>>>>
>>>> from django_fastcgi.servers.fastcgi import runfastcgi
>>>>
>>>> from django.core.servers.basehttp import get_internal_wsgi_application
>>>>
>>>> wsgi_application = get_internal_wsgi_application()
>>>>
>>>>  
>>>>
>>>> runfastcgi(wsgi_application, method="prefork", daemonize="false", 
>>>>
>>>> minspare=1, maxspare=1), maxchildren=1)
>>>>
>>>> I have made sure to:
>>>>
>>>> chmod 0755 app.fcgi
>>>>
>>>> I am able to type into the linux SSH:
>>>>
>>>> app.fcgi
>>>>
>>>> This is what c

Re: Issue with Python 3.6 and Django 2.0 App Deployment on Shared Hosting

2018-12-04 Thread Corey Bishop
Hi! Thanks for your email. The best advice I received and I am so glad that
I took it was switching to heroku. Heroku makes everything so easy. I still
use Bluehost and then I point it at my heroku app. Heroku is the best. I
use postgresql with them and only recently had to start paying them. They
give you up to 10k rows of database for free. I pay 10 per month now and
have 10 million rows and don't pay them for anything else. They solved all
of my problems. It is a pain to switch but highly worth it. You still need
Bluehost though because heroku is a platform as a service type of company.
I had issues with fcgi that heroku resolved, in addition to all sorts of
other things I needed for plotting data on the web. Hopefully this helps
you. Let me know if you have other questions.

Best wishes,



On Sat, Dec 1, 2018 at 09:48 Annchen Knodt  wrote:

> Hi Corey,
> I'm having what seems to be the exact same problem with django/fcgi on
> bluehost shared hosting (getting a 404 in the browser but the appropriate
> html on the command line; I posted my question here
> <https://stackoverflow.com/questions/53474157/django-2-0-7-with-fastcgi-gives-404-in-browser-but-works-on-command-line>),
> so I'm wondering if/how you ended up resolving it.  Any tips would be
> greatly appreciated, thanks!!!
> Annchen
>
> On Friday, January 5, 2018 at 6:26:08 PM UTC-5, coreyj...@gmail.com wrote:
>>
>> Thanks a million for your fast response! I greatly appreciate it. I have
>> made those changes you recommended. I swear I looked at that a million
>> times and couldn't see a difference. Thanks for pointing that out.  I also
>> added to my settings file under templates the word 'INFO' rather than
>> 'DEBUG' and I am able to get my debug.log file to simply now say:
>>
>> Not Found: /
>>
>> These changes are definitely getting me closer. Thank you! I still see
>> the standard 404 page, however, and not the Django 404 page. If I run
>> app.fcgi in my shell I still get all of the Django-specific html but the
>> following errors remain:
>>
>> WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI!
>> WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
>> WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
>> WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!
>>
>> I have tried looking at my fcgi_base.py which is where this error is
>> coming from to see what I should modify:
>>
>> The following code there states:
>>
>>
>>  for name,default in [('REQUEST_METHOD', 'GET'),
>>  ('SERVER_NAME', 'localhost'),
>>  #('SERVER_NAME', '50.87.249.197'),
>>  #('SERVER_PORT', '33606'),
>>  ('SERVER_PORT', '80'),
>>  ('SERVER_PROTOCOL', 'HTTP/1.0')]:
>>  if name not in environ:
>>  environ['wsgi.errors'].write(bytearray('%s:
>> missing FastCGI param %s '
>>'required by
>> WSGI!\n' %
>>
>> (self.__class__.__name__, name), 'utf'))
>>  environ[name] = default
>>
>>
>> That IP I believe is what bluehost recommended me to use but they can't
>> assign me a port because I am on a shared server. When I type in:
>>
>> netstat --listen
>>
>> I can see the open ports and 33606 should be open...
>>
>> I have tried commenting on the code lines above and trying my specific IP
>> and and my port that I believe is open, but the result is the same.
>>
>> Do you by chance see anything else I can try. If you would like I would
>> be more than happy to send you any information you request that you think
>> may be helpful in resolving this. Again, Thank you for your time and help!
>> I greatly appreciate it!
>>
>> Best wishes!
>>
>> Corey
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Friday, January 5, 2018 at 4:59:24 PM UTC-6, Matthew Pava wrote:
>>>
>>> Looking at the .htaccess file and the example provided here:
>>> https://docs.djangoproject.com/en/1.8/howto/deployment/fastcgi/#running-django-on-a-shared-hosting-provider-with-apache
>>>
>>> It looks like you have a typo.
>&

Re: Issue with Python 3.6 and Django 2.0 App Deployment on Shared Hosting

2018-01-05 Thread Matemática A3K
On Mon, Dec 25, 2017 at 7:14 PM, Alok Vaidya  wrote:

> HI All,
>
> I'm a very new into web development as well as very recently started with
> Python 3.6.4 and Django 2.0 and built my first web application
> successfully. Currently I'm in the process of deploying the web-app on a
> shared hosting environment on Bluehost.
>
> I was able to configure both Python and Django latest versions
> successfully on Bluehost server using virstualenv and was able to create my
> test-app ass well on the server directly using SSH client.
>
> Where I'm stuck right now is to make this app work on my domain. I have
> explored everything on google and tried everything possible from my side
> but with no luck in the end. Ever time I try to access my website in my
> local browser, I get the following error message:
>
> 500 Server Error
> A misconfiguration on the server caused a hiccup. Check the server logs,
> fix the problem, then try again.
>
> I understand that it may not be sufficient information for anyone to help
> me with. I'm very new to this whole process of community and forums etc, so
> please let me know in case if you look for any additional info in this
> regard.
>
> I will greatly appreciate any help or pointing me into the right
> direction.
>

In the logs you will find detailed information about the error, you should
start looking at that


>
> Alok.
>
> --
> 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/d38290f8-dd4e-4038-a958-9fed5b32fa34%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/CA%2BFDnhLB6tOt4HvcyvLF3CnNQQvB%2BLdamiOFDzRN6%2BDjH0EV0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with Python 3.6 and Django 2.0 App Deployment on Shared Hosting

2017-12-25 Thread carlos
Hi, actually i deploy very site in bluehost with django 1.11.x and python
2.7.x and it working well but i install the flup app
for working with fastcgi in bluehost, if you show me the config with flup
and version maybe help you.

Cheers

On Mon, Dec 25, 2017 at 4:14 PM, Alok Vaidya  wrote:

> HI All,
>
> I'm a very new into web development as well as very recently started with
> Python 3.6.4 and Django 2.0 and built my first web application
> successfully. Currently I'm in the process of deploying the web-app on a
> shared hosting environment on Bluehost.
>
> I was able to configure both Python and Django latest versions
> successfully on Bluehost server using virstualenv and was able to create my
> test-app ass well on the server directly using SSH client.
>
> Where I'm stuck right now is to make this app work on my domain. I have
> explored everything on google and tried everything possible from my side
> but with no luck in the end. Ever time I try to access my website in my
> local browser, I get the following error message:
>
> 500 Server Error
> A misconfiguration on the server caused a hiccup. Check the server logs,
> fix the problem, then try again.
>
> I understand that it may not be sufficient information for anyone to help
> me with. I'm very new to this whole process of community and forums etc, so
> please let me know in case if you look for any additional info in this
> regard.
>
> I will greatly appreciate any help or pointing me into the right
> direction.
>
> Alok.
>
> --
> 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/d38290f8-dd4e-4038-a958-9fed5b32fa34%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
att.
Carlos Rocha

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


Issue with Python 3.6 and Django 2.0 App Deployment on Shared Hosting

2017-12-25 Thread Alok Vaidya
HI All, 

I'm a very new into web development as well as very recently started with 
Python 3.6.4 and Django 2.0 and built my first web application 
successfully. Currently I'm in the process of deploying the web-app on a 
shared hosting environment on Bluehost.  

I was able to configure both Python and Django latest versions successfully 
on Bluehost server using virstualenv and was able to create my test-app ass 
well on the server directly using SSH client. 

Where I'm stuck right now is to make this app work on my domain. I have 
explored everything on google and tried everything possible from my side 
but with no luck in the end. Ever time I try to access my website in my 
local browser, I get the following error message: 

500 Server Error
A misconfiguration on the server caused a hiccup. Check the server logs, 
fix the problem, then try again.

I understand that it may not be sufficient information for anyone to help 
me with. I'm very new to this whole process of community and forums etc, so 
please let me know in case if you look for any additional info in this 
regard. 

I will greatly appreciate any help or pointing me into the right direction. 

Alok. 

-- 
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/d38290f8-dd4e-4038-a958-9fed5b32fa34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.