Skip to content

Commit

Permalink
Deploying to gh-pages from @ 40ecfb1 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorstrate committed May 2, 2024
1 parent fb3c488 commit eaa6ec9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions en/docs/installation-reverse-proxies/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@
right: 0;
width: 100vw;
height: 100vh;
}</style><aside id="content-toc" class="w-48 sticky docs-toc order-3 flex-shrink-0"><span class="block uppercase text-gray-600 font-bold text-xs tracking-wider pt-0">Contents</span><nav class="toc"><ol><li><a href="#using-caddy">Using Caddy</a></li><li><a href="#using-apache-virtualhosts">Using Apache VirtualHosts</a></li></ol></nav></aside><main id="primary-content" class="mb-40 w-full px-14 py-14"><header class="flex justify-between items-center"><h1>Reverse Proxy</h1><div class="flex items-center"><a title="Edit on GitHub" class="text-gray-500 hover:text-primaryDark no-underline" href="https://github.com/photoview/photoview.github.io/edit/master/./src/en/docs/installation-reverse-proxies.md"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-3"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg> </a><select class="ml-5" id="lg-switcher" onchange="changeLanguage()"><option class="lg-switcher-item" selected="selected" value="/en/docs/installation-reverse-proxies/">English</option><option class="lg-switcher-item" value="/fr/docs/installation-reverse-proxies/">Français</option></select><script>function changeLanguage() {
}</style><aside id="content-toc" class="w-48 sticky docs-toc order-3 flex-shrink-0"><span class="block uppercase text-gray-600 font-bold text-xs tracking-wider pt-0">Contents</span><nav class="toc"><ol><li><a href="#using-traefic-with-docker">Using Traefic with Docker</a></li><li><a href="#using-caddy">Using Caddy</a></li><li><a href="#using-apache-virtualhosts">Using Apache VirtualHosts</a></li></ol></nav></aside><main id="primary-content" class="mb-40 w-full px-14 py-14"><header class="flex justify-between items-center"><h1>Reverse Proxy</h1><div class="flex items-center"><a title="Edit on GitHub" class="text-gray-500 hover:text-primaryDark no-underline" href="https://github.com/photoview/photoview.github.io/edit/master/./src/en/docs/installation-reverse-proxies.md"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-3"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg> </a><select class="ml-5" id="lg-switcher" onchange="changeLanguage()"><option class="lg-switcher-item" selected="selected" value="/en/docs/installation-reverse-proxies/">English</option><option class="lg-switcher-item" value="/fr/docs/installation-reverse-proxies/">Français</option></select><script>function changeLanguage() {
document.location.href=document.getElementById("lg-switcher").value;
}</script></div></header><blockquote><p>TODO: Reverse proxy with <a href="https://doc.traefik.io/traefik/providers/docker/">Traefik</a> + Docker</p></blockquote><h2 id="using-caddy" tabindex="-1"><a class="header-anchor" href="#using-caddy" aria-label="Anchor"></a> Using Caddy</h2><p>Caddy is a great webserver written in go that automatically handles all SSL certificates without the need for certbot.</p><p>First setup Photoview via the regular docker-compose setup <a href="/en/docs/getting-started/">here</a>. Then after installing <a href="https://caddyserver.com/docs/install">Caddy</a> it's time to setup your Caddyfile. Simply edit your caddyfile located at /etc/caddy/Caddyfile to the following (adjust to your domain).</p><pre><code>photos.qpqp.dk {
}</script></div></header><h2 id="using-traefic-with-docker" tabindex="-1"><a class="header-anchor" href="#using-traefic-with-docker" aria-label="Anchor"></a> Using Traefic with Docker</h2><p>Please read the Traefic documentation, as it provides more detailed and accurate info: <a href="https://doc.traefik.io/traefik/providers/docker/">doc.traefik.io</a></p><p>Here is an example of the configuration for the docker-compose file of Photoview:</p><p>Assumptions made in this config:</p><ul><li>Traefic runs in host network mode,</li><li>Public hostname is photoview.foo.bar</li><li>Certificate resolver is named &quot;le&quot;</li><li>HTTPS entrypoint is named &quot;websecure&quot;</li></ul><p>If you enable these labels, remove the ports section</p><pre><code>photoview:
...
labels:
- &quot;traefik.enable=true&quot;
- &quot;traefik.http.routers.photoview.rule=Host(`photoview.foo.bar`)&quot;
- &quot;traefik.http.routers.photoview.service=photoview&quot;
- &quot;traefik.http.routers.photoview.tls=true&quot;
- &quot;traefik.http.routers.photoview.tls.certresolver=le&quot;
- &quot;traefik.http.routers.photoview.entrypoints=websecure&quot;
- &quot;traefik.http.services.photoview.loadbalancer.server.port=80&quot;
- &quot;traefik.http.services.photoview.loadbalancer.server.scheme=http&quot;
...
</code></pre><h2 id="using-caddy" tabindex="-1"><a class="header-anchor" href="#using-caddy" aria-label="Anchor"></a> Using Caddy</h2><p>Caddy is a great webserver written in go that automatically handles all SSL certificates without the need for certbot.</p><p>First setup Photoview via the regular docker-compose setup <a href="/en/docs/getting-started/">here</a>. Then after installing <a href="https://caddyserver.com/docs/install">Caddy</a> it's time to setup your Caddyfile. Simply edit your caddyfile located at /etc/caddy/Caddyfile to the following (adjust to your domain).</p><pre><code>photos.qpqp.dk {
reverse_proxy http://photos.qpqp.dk:8000
}
</code></pre><p>Then all we need to do now is <code>systemctl reload caddy</code> and then your photoview instance should now be accessible via <a href="https://photos.qpqp.dk">https://photos.qpqp.dk</a> with SSL and without the need of specifiying a port. That's it!</p><h2 id="using-apache-virtualhosts" tabindex="-1"><a class="header-anchor" href="#using-apache-virtualhosts" aria-label="Anchor"></a> Using Apache VirtualHosts</h2><p>If you are running the docker for Photoview on the same machine that is hosting your Nextcloud/Owncloud setup, and want them both to be accessible via the standard web port 80 - you'll need to setup a reverse proxy on your owncloud webserver to achieve that. There are many guides online going into more detail on this general type of setup you can refer to, <a href="https://www.digitalocean.com/community/tutorials/how-to-use-apache-as-a-reverse-proxy-with-mod_proxy-on-ubuntu-16-04">like this one here</a>.</p><p>As a crash-course, though, you can achieve this type of setup by enabling the following on your machine running Nextcloud/Owncloud and the Photoview setup by doing the following.</p><p>First, enable the necessary Apache Modules by running the following:</p><pre><code>sudo a2enmod proxy
Expand Down
2 changes: 1 addition & 1 deletion search-data.json

Large diffs are not rendered by default.

0 comments on commit eaa6ec9

Please sign in to comment.