mirror of
https://git.sr.ht/~iwakuralain/text0Nly
synced 2025-07-27 15:36:11 +00:00
fvking centos...
This commit is contained in:
parent
7d1a184952
commit
4d3ee3ab7d
55
README.txt
Normal file
55
README.txt
Normal file
@ -0,0 +1,55 @@
|
||||
Text0Nly - Simple PGP-enabled messenger
|
||||
|
||||
Installation:
|
||||
|
||||
1. Database setup:
|
||||
mysql -u root -p
|
||||
CREATE DATABASE messenger;
|
||||
USE messenger;
|
||||
source main/db.sql
|
||||
|
||||
2. Apache setup:
|
||||
|
||||
CentOS:
|
||||
yum install httpd php php-mysqlnd mariadb-server
|
||||
cp configs/apache.conf.centos /etc/httpd/conf.d/text0nly.conf
|
||||
systemctl start mariadb
|
||||
systemctl enable mariadb
|
||||
systemctl start httpd
|
||||
systemctl enable httpd
|
||||
|
||||
Alpine:
|
||||
apk add apache2 php php-mysql mariadb
|
||||
cp configs/apache.conf.debian /etc/apache2/sites-available/text0nly.conf
|
||||
ln -s /etc/apache2/sites-available/text0nly.conf /etc/apache2/sites-enabled/
|
||||
rc-update add mariadb default
|
||||
rc-update add apache2 default
|
||||
rc-service mariadb start
|
||||
rc-service apache2 start
|
||||
|
||||
Debian:
|
||||
apt install apache2 php mariadb-server
|
||||
cp configs/apache.conf.debian /etc/apache2/sites-available/text0nly.conf
|
||||
a2ensite text0nly.conf
|
||||
systemctl start mariadb
|
||||
systemctl enable mariadb
|
||||
systemctl start apache2
|
||||
systemctl enable apache2
|
||||
|
||||
Files:
|
||||
main/ - Web files
|
||||
configs/ - Server configs
|
||||
configs/apache.conf.centos - Apache config for CentOS
|
||||
configs/apache.conf.debian - Apache config for Debian/Alpine
|
||||
main/db.sql - Database structure
|
||||
main/index.php - Main page
|
||||
main/register.php - Registration
|
||||
main/api.php - Message API
|
||||
|
||||
API usage:
|
||||
curl -X POST http://localhost/api.php -H "Content-Type: application/json" -d '{
|
||||
"username": "name",
|
||||
"message": "text",
|
||||
"signature": "pgp_signature",
|
||||
"encrypted": true
|
||||
}'
|
@ -8,6 +8,6 @@
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
ErrorLog /var/log/httpd/error.log
|
||||
CustomLog /var/log/httpd/access.log combined
|
||||
</VirtualHost>
|
13
configs/apache.conf.centos
Normal file
13
configs/apache.conf.centos
Normal file
@ -0,0 +1,13 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName messenger.local
|
||||
DocumentRoot /var/www/html/main
|
||||
|
||||
<Directory /var/www/html/main>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog /var/log/httpd/error.log
|
||||
CustomLog /var/log/httpd/access.log combined
|
||||
</VirtualHost>
|
13
configs/apache.conf.debian
Normal file
13
configs/apache.conf.debian
Normal file
@ -0,0 +1,13 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName messenger.local
|
||||
DocumentRoot /var/www/html/main
|
||||
|
||||
<Directory /var/www/html/main>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
Loading…
x
Reference in New Issue
Block a user