-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from the1Riddle/revert-3-revert-2-web-debugging
Revert "Revert "Web stack debugging #1""
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
# finding out what’s keeping Ubuntu container’s Nginx installation from.. | ||
# listening on port 80. | ||
# Then, writing a Bash script with a minimum num of commands t automate the fix | ||
sudo sed -i "s/ipv6only=on//" /etc/nginx/sites-available/default | ||
sudo rm -f /etc/nginx/sites-enabled/default | ||
sudo ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default | ||
sudo service nginx restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
# my short version of task 0, making it short N sweet | ||
sed -i 's/8080/80/g' /etc/nginx/sites-enabled/default | ||
pkill -1 nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# <p align="center">Web stack debugging #1</p> | ||
|
||
- this involves identifying and fixing issues at various levels of the web development stack, including the front end, back end, and the server. | ||
|
||
## <p align="center"></p> | ||
|
||
## How to approach web stack debugging: | ||
|
||
### <p align="center">Back-End Debugging:</p> | ||
|
||
1. Server Logs: | ||
> Check server logs for errors and warnings. | ||
> Analyze logs to identify patterns or specific issues. | ||
|
||
2. Database Debugging: | ||
> Ensure database connections are established correctly. | ||
> Check database logs for errors. | ||
> Verify that database queries are returning the expected results. | ||
|
||
3. API Testing: | ||
> Test API endpoints using tools like Postman or cURL. | ||
> Inspect API responses for errors and unexpected behavior. | ||
|
||
4. Code Profiling: | ||
> Use profiling tools to identify performance bottlenecks in your server-side code. | ||
> Profile database queries and optimize slow-performing queries. | ||
|
||
### <p align="center">Infrastructure Debugging:</p> | ||
|
||
1. Server Configuration: | ||
> Verify server configurations for web servers (e.g., Apache, Nginx). | ||
> Check for any misconfigurations that may lead to issues. | ||
|
||
2. Load Balancing: | ||
> If applicable, check load balancing configurations. | ||
> Ensure that requests are distributed evenly among server instances. | ||
|
||
3. Firewall and Security: | ||
> Check firewall settings for any restrictions. | ||
> Verify that security configurations are not blocking legitimate requests. | ||
|
||
4. Resource Monitoring: | ||
> Monitor server resources (CPU, memory, disk space) to identify resource-related issues. | ||
> Use tools like top or server monitoring services. |