Skip to content

Conversation

Copy link

Copilot AI commented Aug 30, 2025

Users encountering 404 errors when reverse proxying Devtron through external nginx servers now have a complete solution. The most common issue occurs when trying to access API endpoints like /autocomplete, which return 404 because the nginx configuration incorrectly splits requests between different services.

Problem

When users configure nginx to reverse proxy Devtron, they often split requests between the dashboard service and devtron service:

# Incorrect approach causing 404 errors
location /dashboard/ {
    proxy_pass http://172.25.0.2/;  # Dashboard service
}
location /orchestrator {
    proxy_pass http://172.25.0.1;   # Devtron service
}

This causes API endpoints like /orchestrator/app/autocomplete to return 404 errors because the frontend requests /autocomplete but the actual endpoint requires the full /orchestrator/app/autocomplete path.

Solution

Added a comprehensive "Reverse Proxy Setup with External Nginx" section to docs/setup/install/ingress-setup.md that explains:

  1. Route all requests to devtron-service - Devtron internally manages routing to dashboard and other components
  2. Proper WebSocket configuration for real-time features like terminal and logs
  3. Security headers and HTTPS setup for production deployments
  4. Troubleshooting guide addressing common 404 API errors

The correct nginx configuration:

# Correct approach - route everything to devtron service
location / {
    proxy_pass http://172.25.0.1;   # All requests to devtron service
    # WebSocket and security headers included
}

Features Added

  • Complete HTTP and HTTPS nginx configuration examples
  • WebSocket support for terminal/logs functionality
  • Security headers for production environments
  • Troubleshooting section with common issues and solutions
  • Validation steps and testing commands
  • Support for both root domain and subdirectory deployments

This documentation resolves the specific /autocomplete 404 error mentioned in the issue and provides a robust foundation for any nginx reverse proxy setup with Devtron.

Fixes #6800.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Author

Copilot AI commented Aug 30, 2025

@prakarsh-dt 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@bito-code-review
Copy link

Bito Automatic Review Skipped - Draft PR

Bito didn't auto-review because this pull request is in draft status.
No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change draft PR review settings here, or contact your Bito workspace admin at [email protected].

@prakarsh-dt prakarsh-dt deleted the copilot/fix-6800 branch August 30, 2025 05:28
Copilot AI restored the copilot/fix-6800 branch August 30, 2025 05:30
@sonarqubecloud
Copy link

Copilot AI changed the title [WIP] HelpRequest: How can devtron be reverse proxied directly through the host machine's nginx? Add comprehensive nginx reverse proxy documentation to resolve API 404 errors Aug 30, 2025
Copilot AI requested a review from prakarsh-dt August 30, 2025 05:36
Copilot finished work on behalf of prakarsh-dt August 30, 2025 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How can devtron be reverse proxied directly through the host machine's nginx?

2 participants