What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Utilizing Nginx for HTTP(S) Traffic Routing

Josh lambright

New Around Here
Has any thought been put into changing the HTTP server over to Nginx? It seems like it could have some major benefits in the area of traffic routing. It would have to be added to busybox, but the abilities it would add would be worth it.

Plus, Nginx now supports HTTP/2, which would mean big things.

https://www.nginx.com/
 
router.asus.com:80 is a part of firmware, it can't be replaced by nginx or any other HTTP server.
 
Has any thought been put into changing the HTTP server over to Nginx?

Totally impossible. The httpd server is a completely custom one, made to dynamically process the page content before sending them to the web client, localizing strings to your chosen language, inserting nvram values and other dynamic content into the HTML stream, etc.. It's also doing all the necessary handling required when you save your settings: processing the settings, handling instanced settings, saving them to nvram, etc...
 
If you like Nginx, you can do so now by installing from Entware.

I have a similar setup on my AC56U. Working great. Can route both incoming and outgoing traffic.
 
If you like Nginx, you can do so now by installing from Entware.

I have a similar setup on my AC56U. Working great. Can route both incoming and outgoing traffic.

What does nginx have to do with routing? It's a web server, it does not do any kind of routing.
 
@RMerlin, nginx works great as back-end server. In my case, it routes domain.com/transmission to transmission WebUI, domain.com/server2 to some other web server and so on.
 
@RMerlin, nginx works great as back-end server. In my case, it routes domain.com/transmission to transmission WebUI, domain.com/server2 to some other web server and so on.

That's proxying, not routing.
 
It's useful as a lightweight, and flexible routing and reverse proxy tool. This creates options for load-balancing, dynamic URL rewrites/redirects, as well as modular configurations.

I don't see why /etc/Nginx/conf.d couldn't be populated with configurations generated from nvram values. Busybox can include Nginx, using opkg. So why couldn't this option work theoretically? Perhaps it would require a forked version of Merlin, that deviates more from the stock firmware, but it seems like an interesting concept.
You

Ooh, and don't forget about allowing SSL/HTTPS traffic to terminate at the router. Since it already acts like a load balancer.
 
Last edited:
That's proxying, not routing.

This thread is apparently talking about layer 7 from the very beginning ;)

I don't see why /etc/Nginx/conf.d couldn't be populated with configurations generated from nvram values. Busybox can include Nginx, using opkg. So why couldn't this option work theoretically? Perhaps it would require a forked version of Merlin, that deviates more from the stock firmware, but it seems like an interesting concept.

Think of httpd on your Asus router as a relatively complex App rather than a web server. Going with your proposal is a complete rewrite based on a different platform. Any sensible program managers won't take it lightly unless they envision new GUI functionality far into the future and unable to be efficiently handled by the existing platform. I don't see either of these two is true at the moment nor I see what new GUI features a router might need in 10 years.

Given that said if someone is interested in overhauling the WebUI for better and easier extensibility, then starting from scratch is a good idea. There will still be heat debates on what platform the new design to be based on. Baking similar stuff like in httpd into Nginx is at the very bottom if you ask me. Why not nodejs, just to say?
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Members online

Back
Top