summaryrefslogtreecommitdiffstats
path: root/vhost.conf
diff options
context:
space:
mode:
Diffstat (limited to 'vhost.conf')
-rw-r--r--vhost.conf33
1 files changed, 33 insertions, 0 deletions
diff --git a/vhost.conf b/vhost.conf
new file mode 100644
index 0000000..03fef31
--- /dev/null
+++ b/vhost.conf
@@ -0,0 +1,33 @@
+<VirtualHost YOUR_SERVER_IP:443>
+ ServerName YOUR_DOMAIN
+ DocumentRoot /path/to/pkgrepo
+
+ SSLEngine On
+
+ ErrorLog "/var/log/apache2/packages_error_log"
+ CustomLog "/var/log/apache2/packages_access_log" common
+
+ <Directory /path/to/pkgrepo>
+ Require all granted
+ Options +Indexes
+ AllowOverride All
+ </Directory>
+
+ # All IndexOptions, HeaderName, ReadmeName are managed in .htaccess
+
+ Include /etc/letsencrypt/options-ssl-apache.conf
+ SSLCertificateFile /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem
+ SSLCertificateKeyFile /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem
+</VirtualHost>
+
+# ── Required Apache modules ───────────────────────────────────────────────────
+# Check what's active: apache2ctl -M | grep -E 'autoindex|headers|php|proxy'
+#
+# a2enmod autoindex <- directory listings
+# a2enmod headers <- Cache-Control headers in .htaccess
+#
+# PHP -- pick one:
+# mod_php: a2enmod php8.4
+# php-fpm: a2enmod proxy_fcgi setenvif && a2enconf php8.4-fpm
+#
+# systemctl reload apache2 \ No newline at end of file