Next.js website works under IP address, but not under domain - url

So I am really desperate right now. It is new year's eve and I don't want to deal with this stuff anymore, but I don't want to slide into 2023 with a broken web app.
Yesterday, suddenly out of nowhere my Next.js production website stopped working properly. The project works well on my localhost, no issues. Also it works fine on my server (if I access the website via IP_ADRESS:3000). But when I use the production URL, the website opens and looks fine but I cannot interact with it, nothing is clickable, nothing reacts, the links do not work, the inputs are broken.
I'm hosting it on a Ubuntu & Nginx DigitalOcean droplet, with Node & Next.js - also I use Cloudflare (and I think it has something to do with that, since with the bare IP address the website works fine).
I tried a lot of things, put it onto a new server, reinstalled Nginx, reinstalled the SSL certificate, rebuild the production build etc, but it still does not work, when I access it through the website url, so the issue must be with that. Though I am really frustrated right now and I don't know what might be causing this.

Related

Rails app on heroku: blank pages on a specific computer

I have a fairly vanilla Rails application on heroku that works fine ... except on my Dad's computer. It is Windows 7, and the site always shows as a blank page. I have checked the following:
Both Chrome, Firefox and IE (latest versions) all exhibit the problem. Web inspector on Chrome and FF shows either a 200 or 304 response code, but blank body.
I have tried clearing the cache.
Curl on his machine successfully downloads the page.
My laptop on his network views the page fine.
His laptop on other networks still exhibits the problem.
His other laptop works fine.
Multiple other machines (5+) work fine.
Server logs show a successful response being served.
Turned off Microsoft Security Essentials.
Turned off the firewall.
I'm stumped. What other debugging steps should I try?
For reference, the site is http://gccc.herokuapp.com/
Solution from twitter: https://www.malwarebytes.org/ picked up a couple of Trojans that were causing issues. I had assumed "Microsoft Security Essentials" was doing this, but I guess that is something different.

MVC WebApplication no longer starts in IIS Express (redirects to https://localhost in Chrome)

I was changing OAuth/Owin settings and Azure publish settings in a Web Application project this morning, but soon after we decided deployment will be to a specific IIS Azure VM (now visible across our local domain). All code/setting changes have been reverted.
At one point I also changed the drivers\etc\hosts file to allow a dummy name for Microsoft OAuth, but that has been reverted.
Notes:
My startup URL is http://localhost:22222/
I am running under IIS Express (as my local Dev VM will not allow me to install full IIS)
When I start the Web Application with IE I simply get "This page can't be displayed"
If I start it with Chrome I get "This webpage is not available", but it also changes the browser URL to https://localhost (note the s, i.e. using SSL).
I have pulled the project down fresh from source control. No change.
The project is under TFS source control.
Another developer on the same project has the latest files and it works fine.
If I run any other Web Application project, they work just fine.
All OWIN registration of providers has been commented out. No change.
Deleted the entire project folder and pulled fresh from TFS. No change. This probably means a local machine setting somewhere is the cause?
What could I have damaged in my Web Application to cause this problem? I have been scratching my head for hours now and nothing we try is working. The application simply will not start in any browser.
Project Web Settings tab:
Answer at bottom, given to this chromium issue [issue 444479] helped me:
Same here - I also believe caused by HSTS - see
http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
If you have (developed) any other localhost sites which send a HSTS
header...
eg. Strict-Transport-Security: max-age=31536000; includeSubDomains;
preload
...then depending on the value of max-age, future requests to
localhost will be required to be served over HTTPS.
To get around this, I did the following.
In the Chrome address bar type "chrome://net-internals/#hsts"
At the very bottom of a page is QUERY domain textbox - verify that localhost is known to the browser
If it is, DELETE the localhost domain using the textbox above
Your site should now work using plain old HTTP
HTH,
Jay
ps. This is not a permanent solution, but will at least get it working
between projects. If anyone knows how to permanently exclude localhost
from the HSTS list please let me know :)
Give it a try.

lvh.me:3000 no longer resolving to localhost:3000 for testing subdomains in development

I followed Railscast 121 to set up subdomains for my site, www.blog.com, and got everything working in development. I could use lvh.me:3000 to access my application at both the root url www.blog.com and at the specific subdomains I set up e.g. john-doe.blog.com
After pushing to Heroku, I can no longer connect to the root url at lvh.me:3000. What could be causing this?
Symptoms in development environment:
I can access www.blog.com through localhost:3000.
I cannot access www.blog.com at lvh.me:3000. but CAN still access john-doe.blog.com.
I opened a DIFFERENT application www.secondapp.com, and the root path for this also works at localhost:3000 but not at lvh.me:3000. I have not set up any subdomains for secondapp, but tried the url john-doe.secondapp.com just in case, and for some reason, this works. Very strange...
I must have inadvertently adjusted some files, but I don't know where/how. It's completely beyond me why a completely different app would work with a subdomain for an unrelated app. Any feedback would be much appreciated.
This is because of the current godaddy outage. Once their DNS is back up, it should resolve correctly.
In the meantime, you can try editing your hosts file.

URL Routing Works locally but not on hosting server

I asked a question a while back about URL routing and was pointed in the right direction. I've coded it all up in vb.net and works like a charm locally. When I upload it to my hosting server, it ceases to work.
For example if you go to: http://www.nightcat-online.com/Blog/2011/11 It takes you to the 404 page (which it shouldn't) and for whatever reason the css is gone. (If you go to http://www.nightcat-online.com/404.aspx the css shows up fine)
The hosting server is running IIS7. My web config that I use locally is basically the same as the one I upload, except for the connection string and the compilation debug.

MVC.NET 404 outside of Domain

I am trying to get a demo site for a client setup. This is the 1st application my company is doing in MVC.NET, so I get to experience all the new things to find out (and all the headaches it'll cause).
Anyway, the site works fine locally (localhost) and on the server inside our domain. External users not on the domain however, only get 404 errors. I've tried several different settings/ config options I've found on this site, but nothing is working. I don't know if it's a web.config issue or an IIS issue, or even simply a permissions issue (though it has all the same permissions as the other sites we run with Web Forms).
IIS: v7 in intergrated mode.
Windows Server Web
Well, because you received a 404, the server is being reached okay which is a good sign. (Dealing with firewall issues at a company is always a lot of fun.)
A common problem for something like this is the use of virtual directories to host the website. For example, if the address to your site is http://example.com/MySite/, in MVC that would translate to: /MySite/View/Index.aspx. HOWEVER...if you are using virtual folders, /MySite/ may instead point to another spot on the server (e.g. C:\WebSites\MySite). If you are indeed using virtual paths, make sure you have your files stored at the correct path.
There is a troubleshooting tutorial here: http://support.microsoft.com/kb/248033
thanks for the answers everyone. Turns out it was something with our DNS routing setup with the sub-domains. It was getting rerouted to a place that didn't exist. Our IT guy finally got around to fixing it (ugh!)

Resources