I have followed this tutorial to run flask application using apache2 server. But after I followed its instructions and when opened the {publicDNS}/flaskapp page not found error occurred. How can i solve this problem.
Thank You.
It takes sometime to configure the server. You have to restart it and see the public DNS
Related
I have a Python application that's that has been working correctly as backend for my website, up to now I have been running it using "python manage.py runserver IP:8000" in CMD. However I would like it to start using HTTPS, but when I try to access through my browser on https://IP:PORT I get the following error:
You're accessing the development server over HTTPS, but it only
supports HTTP.
The server I am running all of this is a Windows Center 2019 DataCenter, normally on a linux environment I would just use NGINX+GUNICORN.
I was browsing possible solutions and stumbled upon this, however I already am using IIS to host a website (My frontend), so I needed to figure out how to host several websites for the same IP, I have now found this.
Long story short, I configured the new IIS website for it to access my django, I then changed the hostname since both frontend and the new backend will using the same ip and ports (80, 443).
But now I have hit a spot where I'm confused due to my lack of experience in IIS and networking. I can't seem to understand how the request will go through to my Python-Django APP.
Something important to mention on how I access the Django APP in the past.
Lets say my front end is https://pr.app.com, whenever any request needed to be made to the backend. I would ask for said information in http://pr.app.com:8000/APIService/..../
This is how the binding for my frontend looks like
And this is the binding for the new backend where I changed the hostname as the second guide linked said
Any guidance or help would be most appreciated,
Thanks in advance
*Update
So I tried pausing my frontend website and used these bindings on the new backend website, I was able to get a screen of Django meaning it seems to be working or at least communicating.
Now I would need to have the hostname of the backend (pr.abcapi.com) somehow refer or redirect to the hostname of the frontend (pr.abc.com).
How could I achieve this?
Certbot has this section in the beginning where I have to specify
"My HTTP website is running **(web server) on **(system it's running on )"
I use Google Domain for my domain and heroku to deploy. I'm using Django.
After a bit of research I found out that my website is runing on a gunicorn webserver. In this case, which one should I select on the Software? They have Apache, Nginx, Haproxy, Plesk, Web hosting product, none of the above. Also How can I find out which system my webdite is runing on?
Thank you in advance. Any advice is appreciated.
I'm aware that if I upgrade my heroku to a padiu version it's easier but I want to do it for free. I got my account verrified.
In my droplet is running several PHP websites, recently I tried to deploy a Django website that I build. But it's doesn't work properly.
I will explain the step that I did.
1, Pointed a Domain name to my droplet.
2, Added Domain name using Plesk Add Domain Option.
3, Uploaded the Django files to httpdocs by Plesk file manager.
4, Connected the server through ssh and type python manage.py runserver
0:8000
5, My Django Website is successfully running.
Here are the real issues occurs, We need to type exact port number to view the website every time. Eg:- **xyz.com:8000 **
As well as the Django webserver is down after sometimes.
I am newbie to Django all I have experience in deploying a PHP website. If my procedure is wrong please guide me to correct procedure.
Thanks in Advance.
Django Runserver is not a production one, it should be used only for development. That's why you need to explicitly type in the port and it sometimes go down because of code reload or other triggers.
Check Gunicorn for example, as a production server for Django applications. (there are other options also)
I suggest following this guide. Covers initial setup of django with gunicorn and nginx which is essential for deployment, you don't have to add the port to access the site. It doesn't cover how to add the domain but it seems you already know how to add the domain though.
A website has been developed on a local ubuntu machine using python flask. The website runs fine on ubuntu at 127.0.0.1:5000. This website is supposed to go live on a godaddy server for which there is cpanel access. How to do it?
If it's a shared hosting solution, Answer to your question is NO, you can't do it. In a shared hosting environment Godaddy using only a PHP Stack. so you won't be able to use python there. Either go with VPS and configure your server. or go with a cloud service provider like Digital ocean, AWS, Linode etc.,
If your CPanel has the "Setup Python App" option (it's CloudLinux-based), you can try to deploy there.
I had a problem where only the root URL would work and all other routes returned 404.
Add the following to the top of your .htaccess file:
RewriteEngine on
RewriteRule ^http://%{HTTP_HOST}%{REQUEST_URI} [END,NE]
Got this info from: https://stackoverflow.com/a/63971427/10122266
Apologies that I couldn't add this as a comment as I do not have sufficient rights yet. But this solution worked for me and it would be a pitty if this little gem is hidden from those who may arrive here.
So would appreciate if this post is not deleted.
Currently I am trying to deploy a server for Mit App Inventor, when I browser the project it looks just fine and the local host works as well. The problem is that when I try to deploy it I get an error. I am using python 2.7.8. By the way I am doing this project from my other gmail account.
I have tried and retried a thousand times, but with no result. Can you please help me?
This is the main error
It says that that's an error when reading a line.
From what I can see you're still using the Google App Engine Launcher which I think was deprecated and is no longer supported. The point is that it still uses appcfg.py to deploy and from the error message you get it also tries to use login/password for authentication which is also no longer supported.
Today you should use the Cloud SDK and the gcloud command line to manage/deploy your app. I'm confident that will solve your issue.