Skip to content

Commit

Permalink
Merge pull request #6 from the1Riddle/revert-3-revert-2-web-debugging
Browse files Browse the repository at this point in the history
Revert "Revert "Web stack debugging #1""
  • Loading branch information
the1Riddle authored Dec 6, 2023
2 parents 343f058 + 9419f36 commit 8b40652
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 0x0E-web_stack_debugging_1/0-nginx_likes_port_80
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
4 changes: 4 additions & 0 deletions 0x0E-web_stack_debugging_1/1-debugging_made_short
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
44 changes: 44 additions & 0 deletions 0x0E-web_stack_debugging_1/README.md
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">![image](https://github.com/the1Riddle/alx-system_engineering-devops/assets/125451537/7287d3c2-b790-4654-9f97-4e57e320baf8)</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.

0 comments on commit 8b40652

Please sign in to comment.