v3 init push
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Serve https://localhost/mythoughts/ from the public web root.
|
||||
#
|
||||
# Include this from the site VirtualHost (or paste the Alias/Directory block
|
||||
# into the existing one). Everything outside public/ - lib/, config/, vendor/,
|
||||
# node_modules/ - stays off the document root and is never web-reachable.
|
||||
|
||||
Alias /mythoughts /var/www/html/mythoughts/public
|
||||
|
||||
<Directory /var/www/html/mythoughts/public>
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
|
||||
DirectoryIndex index.php
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
# Vite writes content-hashed asset names, so they are safe to pin.
|
||||
<FilesMatch "\.[0-9a-f]{8,}\.(js|css|woff2?|svg)$">
|
||||
Header set Cache-Control "public, max-age=31536000, immutable"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_brotli.c>
|
||||
AddOutputFilterByType BROTLI_COMPRESS \
|
||||
text/html \
|
||||
text/plain \
|
||||
text/css \
|
||||
text/javascript \
|
||||
application/javascript \
|
||||
application/json \
|
||||
application/manifest+json \
|
||||
image/svg+xml
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE \
|
||||
text/html \
|
||||
text/plain \
|
||||
text/css \
|
||||
text/javascript \
|
||||
application/javascript \
|
||||
application/json \
|
||||
application/manifest+json \
|
||||
image/svg+xml
|
||||
</IfModule>
|
||||
</Directory>
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
[03.09.2026 17:30:38] Notice - /var/www/html/objects/inc/Db.php - Last query had no effect on db: "UPDATE users SET token = '', token_exp = '0000-00-00 00:00:00' WHERE id_user = '2' LIMIT 1;"
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
class Settings {
|
||||
public const DB_SERVER = 'localhost';
|
||||
public const DB_LOGIN = '';
|
||||
public const DB_PASS = '';
|
||||
public const DB_NAME = 'mythoughts';
|
||||
public const DB_ENC = 'utf8mb4';
|
||||
public const TEXT_ENC = 'UTF-8';
|
||||
public const TIMEZONE = 'Europe/Zurich';
|
||||
public const DEBUG = true;
|
||||
public const LOG_FOLDER = __DIR__;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
-- Bootstrap for a fresh MyThoughts install.
|
||||
--
|
||||
-- Only the database and its user are created here. The schema itself is not in
|
||||
-- this file on purpose: Main::install() builds it from the table description in
|
||||
-- MyThoughts::getSqlOptions(), so the structure has exactly one definition and
|
||||
-- a migration can never drift from it. On first run the app finds an empty
|
||||
-- database and installs itself.
|
||||
--
|
||||
-- Run as an administrator:
|
||||
-- mariadb -u root -p < config/setup-database.sql
|
||||
--
|
||||
-- Then put the same credentials in config/settings.php.
|
||||
|
||||
CREATE DATABASE IF NOT EXISTS `mythoughts`
|
||||
DEFAULT CHARACTER SET utf8mb4
|
||||
DEFAULT COLLATE utf8mb4_general_ci;
|
||||
|
||||
CREATE USER IF NOT EXISTS 'mythoughts'@'localhost' IDENTIFIED BY 'mythoughts';
|
||||
|
||||
-- ALL on the one schema, which also lets the app create and drop it during a
|
||||
-- first-run install without handing it rights over anything else on the server.
|
||||
GRANT ALL PRIVILEGES ON `mythoughts`.* TO 'mythoughts'@'localhost';
|
||||
|
||||
FLUSH PRIVILEGES;
|
||||
Reference in New Issue
Block a user