diff --git a/README.md b/README.md index e9fcd58..5df3583 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,44 @@
www.victorwesterlund.com
The source code for victorwesterlund.com
+This guide is for Unix-based systems with NGINX, PHP 8.0 and MariaDB installed and configured.
+git clone https://github.com/VictorWesterlund/victorwesterlund.com /var/www
/public
to the web.location
block or symlink should do the trick.api.php
to api/*
.example.com/api/*
should be routed to the PHP file at /public/api.php
.location ~ /api/* { + try_files /public/api.php =503; + include snippets/fastcgi-php.local.conf; + fastcgi_pass unix:/run/php/php8.0-fpm.sock; +}
.mjs
extension..mjs
) file extension in its default /etc/nginx/mime.types
file. We need to add this manually:+types { + ... + application/javascript js mjs; + ... +} +PS: If you want to make your
Content-Type
WG compliant, replace application/javascript
with text/javascript
.sql
can be downloaded here and imported into a database with this command:mysql -u username -p database_name < db_structure.sqlYou will have to create an empty database if you don't have one already.
/src/database/config.json
.
+{
+ "servers": [
+ {
+ "host": "db.example.com",
+ "user": "mysql_user",
+ "pass": "mysql_pass",
+ "db": "mysql_db"
+ },
+ {
+ "host": "fallback.db.example.com",
+ "user": "mysql_user",
+ "pass": "mysql_pass",
+ "db": "mysql_db"
+ }
+ ]
+}
+
That was a lot, but now we're done! Navigate to the location you exposed in step 2 and cross your fingers 🤞