Why Cannot You Browse to a URL Path with a File Name in a Web Browser when the index.html File is Available?

Problem scenario
You know foobar.html is in a directory on a web server that houses index.html. You cannot go to foobar.html in a web browser — but you can go to index.html. How do you fix this?

Possible solution #1
Are the permissions of foobar.html different from index.html? Is there a slight spelling error in the file name on the back-end?

How Do You Troubleshoot the Error Message “Client sent an HTTP request to an HTTPS server”?

Problem scenario
You run curl commands, but you keep getting this error “Client sent an HTTP request to an HTTPS server.” What should you do?

Possible Solution #1
Use https instead of http. See this for more information.

Possible Solution #2
The “problem” is not actually a problem or a true error message.

How Do You Determine What WordPress Theme Your Website Is Using?

Problem scenario
You use WordPress. You want to find (or identify) what theme you are using. What should you do?

Solution

  1. Find the URL you use to browse WordPress (e.g., with wp-admin).
  2. Hack (or create or draft) the URL in text by making it follow this convention: https://www.foobar.com/wp-admin/themes.php
  3. Be logged into WordPress, and then browse to that drafted/hacked URL.

How Do You Log Out of a Company’s Website?

Problem scenario
You are logged into an e-commerce website or a utility website. When you click log out, the page refreshes. You never really log out (as you are logged back in automatically). What are you doing wrong?

Possible Solution
Close the web browser that does not log you out. Try a different web browser (e.g., use Firefox if a different web browser had the problem).

How Do You Get a Table in HTML/Javascript to Display Only The First n (or 10) Rows?

Problem scenario
You have a web page with a table. It uses HTML and Javascript. You want only a sub-portion of the rows to be displayed and allow the user from the front-end to click a drop down menu to see more results. What should you do?

Possible Solution #1
Have two blocks in the .html file. Have the top one define a function that accepts a parameter and filters the table results if/when called.

What is a Recommended Practice for Handling Asynchronous Requests with Long-Running Processes with Flask?

Problem scenario
You are designing a Flask application with Python running some long-running processes. You want to handle the requests asynchronously. The individual requests will have a duration of more than one hour. What is the recommended way of handling this?

Solution
Use a task queue like Celery or RQ (Redis Queue).

Sources:
https://stackoverflow.com/questions/42790362/how-to-handle-long-sql-query-in-flask

Flask API app for long running process?

How Do You Search the Logs of a Website that Is Not Functioning Properly?

Problem scenario
You have a website that is not working. You tried using Fiddler on the front-end. You want to examine the logs on the backend to find the problem. What should you do?

Possible Solution #1
Use a case insensitive grep for “error” or “violation”. Search also for patterns such as “40” and “50” in separate searches.

To get help finding the logs,

With Nginx Can a .pem file replace a .crt and/or a .key File?

Problem scenario
You know .crt and .key files can pair as ssl_certificates and SSL certificate keys respectively. In Nginx, can .pem files replace .crt files? Can .pem files potentially replace .key files? Can a .pem file be a substitute?

Solution
Yes to some extent, for the nginx.conf file, a .pem file can replace a .crt file and potentially a .key file too.