<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Webserver on homelab</title>
    <link>https://homelab.nbkelley.com/tags/webserver/</link>
    <description>Recent content in Webserver on homelab</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Wed, 26 Mar 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://homelab.nbkelley.com/tags/webserver/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Nginx vs Apache for Static Hosting</title>
      <link>https://homelab.nbkelley.com/docs/services/web_server_comparison/</link>
      <pubDate>Wed, 26 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://homelab.nbkelley.com/docs/services/web_server_comparison/</guid>
      <description>&lt;h1 id=&#34;nginx-vs-apache-for-static-hosting&#34;&gt;Nginx vs Apache for Static Hosting&lt;a class=&#34;anchor&#34; href=&#34;#nginx-vs-apache-for-static-hosting&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;what-was-established&#34;&gt;What Was Established&lt;a class=&#34;anchor&#34; href=&#34;#what-was-established&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;A comparison of Nginx and Apache for the purpose of hosting static HTML/CSS/JS files within a Proxmox LXC or VM.&lt;/p&gt;&#xA;&lt;h2 id=&#34;key-decisions&#34;&gt;Key Decisions&lt;a class=&#34;anchor&#34; href=&#34;#key-decisions&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Choose Nginx if&lt;/strong&gt;: You prioritize performance, low memory footprint, and plan to use it as a reverse proxy for modern stacks (Node.js, Python).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Choose Apache if&lt;/strong&gt;: You require &lt;code&gt;.htaccess&lt;/code&gt; support for per-directory configuration or are working with legacy PHP/LAMP stacks.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;current-configuration&#34;&gt;Current Configuration&lt;a class=&#34;anchor&#34; href=&#34;#current-configuration&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;nginx-basic-static-config&#34;&gt;Nginx Basic Static Config&lt;a class=&#34;anchor&#34; href=&#34;#nginx-basic-static-config&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-nginx&#34; data-lang=&#34;nginx&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;server&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;listen&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;80&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;root&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;/var/www/html&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;index&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;index.html&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;apache-basic-static-config&#34;&gt;Apache Basic Static Config&lt;a class=&#34;anchor&#34; href=&#34;#apache-basic-static-config&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-apache&#34; data-lang=&#34;apache&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;VirtualHost&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;*:80&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    DocumentRoot &lt;span style=&#34;color:#e6db74&#34;&gt;/var/www/html&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    DirectoryIndex index.html&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;deployment-commands-lxc&#34;&gt;Deployment Commands (LXC)&lt;a class=&#34;anchor&#34; href=&#34;#deployment-commands-lxc&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;To create a standard Ubuntu 22.04 LXC for web hosting:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Web Server Architecture on Proxmox</title>
      <link>https://homelab.nbkelley.com/docs/infrastructure/web_server_architecture/</link>
      <pubDate>Wed, 26 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://homelab.nbkelley.com/docs/infrastructure/web_server_architecture/</guid>
      <description>&lt;h1 id=&#34;web-server-architecture-on-proxmox&#34;&gt;Web Server Architecture on Proxmox&lt;a class=&#34;anchor&#34; href=&#34;#web-server-architecture-on-proxmox&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;what-was-established&#34;&gt;What Was Established&lt;a class=&#34;anchor&#34; href=&#34;#what-was-established&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;High-level architectural strategies for deploying web development environments on Proxmox, focusing on balancing isolation with resource efficiency.&lt;/p&gt;&#xA;&lt;h2 id=&#34;key-decisions&#34;&gt;Key Decisions&lt;a class=&#34;anchor&#34; href=&#34;#key-decisions&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;LXC for Services&lt;/strong&gt;: Use LXC containers for lightweight, single-purpose services (e.g., Nginx, Databases) to minimize overhead.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;VM for Complex Workloads&lt;/strong&gt;: Use full VMs when running Docker, Kubernetes, or when custom kernel modules are required.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Reverse Proxy Pattern&lt;/strong&gt;: Always use a reverse proxy (Nginx Proxy Manager, Traefik, or C/Caddy) to handle SSL termination and route traffic to multiple internal services.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Database Isolation&lt;/strong&gt;: Separate databases into their own containers/VMs to improve security and facilitate independent backups.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;current-configuration&#34;&gt;Current Configuration&lt;a class=&#34;anchor&#34; href=&#34;#current-configuration&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;networking-patterns&#34;&gt;Networking Patterns&lt;a class=&#34;anchor&#34; href=&#34;#networking-patterns&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Bridge Mode&lt;/strong&gt;: Default &lt;code&gt;vmbr0&lt;/code&gt; for services requiring LAN access.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Internal Network&lt;/strong&gt;: Use secondary bridges (e.g., &lt;code&gt;vmbr1&lt;/code&gt;) for isolated communication between web servers and databases.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;storage-patterns&#34;&gt;Storage Patterns&lt;a class=&#34;anchor&#34; href=&#34;#storage-patterns&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Local-LVM&lt;/strong&gt;: Preferred for high-performance VM/container disks.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Directory Storage&lt;/strong&gt;: Suitable for container volumes and simpler storage needs.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;historical-notes&#34;&gt;Historical Notes&lt;a class=&#34;anchor&#34; href=&#34;#historical-notes&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;This architecture plan was established in March 2025. The preference for LXCs over VMs for simple web services was a primary driver.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
