Website intermittent load failure - something wrong with DNS? - django

Quick overview:
Developed web app with Python and Django; developed and tested locally; adjusted settings to harden for deployment
Deployed app to Heroku for simple hosting platform; tested and worked successfully
Purchased hobby hosting on Heroku so deployed app would not sleep; I can still verify this to be true, the app loads instantly at myappname.herokuapp.com
Purchased domain name on GoDaddy
Used a free CloudFlare account to manage DNS
Entire chain of operation works successfully sometimes, but sometimes I get a website coming soon page:
So when I go to bed last night, everything works. I can load the app from the purchased domain name on all my computers and mobile devices. I wake up this morning, and I'm once again getting the coming soon page. No matter how many times I refresh, and with cache disabled in Chrome so I know it's not my browser.
Everything is working perfectly on the Heroku side, since I can load the app there every single time. Once I told GoDaddy to use Cloudflare's nameservers I think there can't be an issue on GoDaddy's side. There has to be something with Cloudflare.
The DNS settings on Cloudflare are super simple:
CNAME for my.url pointing to my.url.herokudns.com
CNAME for www as an alias of my.url
The hardest part is that it just sometimes works and sometimes doesn't. I can't nail this down.

Related

How to host two websites on AWS on Windows and Apache but only one site works

I have two sites we'll call Site1.com and Site2.com.
I recently converted my VPS with another host to an image and imported the image into AWS. On the VPS, I was able to serve up both sites. Under AWS, whichever URL is accessed first, the second site will display the content and the URL will change to the first accessed site.
The setup is unique in that it is Windows running an apache web server (very old application). No changes to the conf files have been made since the conversion so I can only assume that it's something unique with the AWS setup.
Why is it doing this and more importantly how can I fix this so that I don't have to spin up a second instance.
Turns out the issue is with the instance type. When I bumped it up to medium (from small), the issue resolved itself. Go figure.

Running a flask application on a local network with a domain name?

I am doing a side project of transitioning my companies inhouse accounting app to a flask based web site.
I was just testing today to see if I could deploy onto the local network for everyone to access, and that worked will enough however it was my computers local ip ie something like 192.168.1.212:5000.
Is there a way I can run the flask app off my computer and on my computers local network where they could go to something like ourcompanyapp.com and get the app?

Django requests printed in IDE over WEB

I am posing this questions since I didn't found anything that would already solve my little problem. I want to know if I can see requests over the internet on my IDE Pycharm or any other. Normally when I hosted site via localhost I saw requests I did, and I was also able to see printed suff. Now when I implemented WSGI, maping external IP to free hostname I don't see live requests anymore (all is hosted locally on windows with xampp apache2).

Accessing javascript resource under a Rails Engine throws net::ERR_CONNECTION_RESET

I have a Rails 4.2.1 application with multiple engines under it. The application has been hosted in production with Apache2 and Passenger and was working fine till a few weeks back. I am now facing a strange problem and unable to load assets under one particular engine and get the error "Failed to load resource: net::ERR_CONNECTION_RESET" when trying to load javascript or other asset files under a particular engine.
The application structure is
Root
AssessmentTools (app->assets->javascript->assessment_tools->angular.js)
QuestionBankTools (app->assets->javascript->question_bank_tools->angular.js)
All seems to work fine when loading resources under AssessmentTools (http:///assets/assessment_tools/angular.js), but fails for QuestionBankTools (http:///assets/question_bank_tools/angular.js).
Also, everything seems to work fine on localhost and even in a VM that i hosted on my development machine (with app running behind Apache2 and Passenger), but the problem appears when i host it on server behind a proper a domain.
I have tried cleaning up the server and re-installing the application but without success. I am not able to figure out what could have changed in the past weeks to create this issue.
In my case the problem turned out to be an over eager firewall filter introduced by the data server admin. They had blocked off all url having particular keywords in it.
Fixed the firewall and all is well.

Connect two apps via custom subdomain on heroku

I have two separate rails apps. I'd like to connect them by simply linking them in the header. One is, for example, http://example.com and I'd like the other to be, for example http://different.example.com.
I added the relevant domain to the first heroku app and it's working. I created a subdomain with my domain host, setting the host CNAME to the previously referenced "different." I then attempted to add the subdomain to the heroku app by running the command:
$ heroku domains:add different.example.com
Despite that, it's not working. Any thoughts on what I've done wrong? I followed the instructions from my domain host and on heroku's documentation.
If you made a recent change, it's possible that your connection to the Internet or ISP might be serving you a cached, old version of where you want to go.
Try accessing the site from another entry point such as through a third party like https://crossbrowsertesting.com and then you can rule out this possibility.