Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SWAG as Web Server? Any Guides to Follow?

Featured Replies

I've been using SWAG for reverse proxy for quite some time, works great.

I get the idea that SWAG (nginx) is basically a web server with php. I have a local php website I'd like to run off of it, if possible. It's currently running on XAMPP for Windows.

 

Anyone know of any guides to using SWAG as a web server beyond a reverse proxy?

 

Thanks!

  • Community Expert

While you technically could it's not a great idea to mix things, run a separate web server container for the site and RP it. 

  • Author
2 minutes ago, Kilrah said:

While you technically could it's not a great idea to mix things, run a separate web server container for the site and RP it. 

Initially I was looking for a web server container, but I couldn't seem to find one and ran across a reddit thread talking about SWAG already being a web server, so use that.

 

I like the idea of containers having a specific purpose (kinda the point of them). Any suggestions for an Apache/PHP/MySQL container? Or should I run the DB as a separate container?

 

I'm not super well-versed in web servers. Mostly only used XAMPP for development and then posted to linux-based web servers with control panels like cPanel. The nitty gritty of setting one up as individual pieces is pushing my knowledge a bit. 🙂

Nginx Proxy Manager can pull triple duty for light web-serving, reverse proxy and certificate procurement/renewal - an easy to use webUI will let you deploy/set up hosts/pages/sites likely a bit easier than SWAG - using the same web server under the hood of course.

 

You can then spin up another pure Nginx container or Apache or whatever, to serve more complex content. That's how I'd do it. MySQL, Maria, Postgres or other databases can sit in their own containers and work along-side.

 

Edited by Espressomatic

  • Author
10 minutes ago, Espressomatic said:

Nginx Proxy Manager can pull triple duty for light web-serving, reverse proxy and certificate procurement/renewal - an easy to use webUI will let you deploy/set up hosts/pages/sites likely a bit easier than SWAG - using the same web server under the hood of course.

 

You can then spin up another pure Nginx container or Apache or whatever, to serve more complex content. That's how I'd do it. MySQL, Maria, Postgres or other databases can sit in their own containers and work along-side.

Back when I first set up SWAG, I looked at NPM, but ultimately went with SWAG. I can see how it might be a bit friendlier for webhosting.

 

But you're still saying spin up a separate Apache for more complex content?

If I'm still doing that I'll likely just continue using SWAG for my reverse proxy and use it to point to sites hosted on whatever web serving solution I end up with (still trying to figure out exactly what that is 😄 ).

Ya, different container. In my case, I treat reverse proxy as an edge service, so NPM runs on a system dedicated to those types of tasks. The same system on which I run pfSense firewall/router (in VM) along with AdGuard Home for DNS black hole. Other services, of mixed purpose, run on an apps and general-services-oriented system, so that includes web-serving, media serving, etc.

I've run simple static pages directly from NPM, as well as used it to wrap directory listings using Fancy Index, but I wouldn't run active content nor data-driven content on it while using it for proxy and TLS duty for the entire network.

Edited by Espressomatic

  • Community Expert
2 hours ago, Mattaton said:

Any suggestions for an Apache/PHP/MySQL container?

There are apache/php and nginx/php containers in apps, db is usually separate.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.