[web-downloads] main: Add initial setup in README
| From: | Shivam Mathur | Date: | Fri, 04 Oct 2024 11:55:41 +0000 |
| Subject: | [web-downloads] main: Add initial setup in README | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-32139@lists.php.net to get a copy of this message | ||
Author: Shivam Mathur (shivammathur)
Date: 2024-10-04T17:23:03+05:30
Commit: https://github.com/php/web-downloads/commit/6dd4190bc97cb3c31532b28a457cdd9fd97e495a
Raw diff: https://github.com/php/web-downloads/commit/6dd4190bc97cb3c31532b28a457cdd9fd97e495a.diff
Add initial setup in README
Changed paths:
M README.md
Diff:
diff --git a/README.md b/README.md
index a432638..0254061 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,35 @@
This project is a collection of scripts to handle downloading builds to the downloads.php.net
server
+## Set up
+
+- Copy
env.example to .env and set the AUTH_TOKEN and
BUILDS_DIRECTORY values.
+
+- Install dependencies.
+
+```bash
+composer install
+```
+
+- Set up a virtual host in Apache to point to the public directory as the
DocumentRoot.
+
+- Set up the ErrorDocument for 404 to point to public/redirect.php in the
virtual host configuration.
+
+- Set up the following rewrite rules in the virtual host configuration:
+
+```apache
+<Directory "/path/to/public/directory">
+ <IfModule mod_rewrite.c>
+ RewriteEngine On
+ RewriteCond %{HTTP:Authorization} .
+ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^ index.php [L]
+ </IfModule>
+</Directory>
+```
+
## License
[MIT](LICENSE)
\ No newline at end of file