mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
rename posterg → xamxam throughout: nginx conf, scripts, PHP source, docs
This commit is contained in:
@@ -20,7 +20,7 @@ just deploy-nginx
|
||||
### 2. Apply on the server
|
||||
|
||||
```bash
|
||||
ssh posterg
|
||||
ssh xamxam
|
||||
sudo bash /tmp/deploy-server.sh
|
||||
sudo systemctl reload nginx
|
||||
```
|
||||
@@ -29,7 +29,7 @@ sudo systemctl reload nginx
|
||||
|
||||
```bash
|
||||
just manage-admin-users
|
||||
ssh posterg "sudo bash /tmp/manage-admin-users.sh"
|
||||
ssh xamxam "sudo bash /tmp/manage-admin-users.sh"
|
||||
```
|
||||
|
||||
## Manual Setup Steps
|
||||
@@ -46,14 +46,14 @@ sudo apt install nginx apache2-utils php8.4-fpm
|
||||
```bash
|
||||
just manage-admin-users
|
||||
# Then on the server:
|
||||
ssh posterg "sudo bash /tmp/manage-admin-users.sh"
|
||||
ssh xamxam "sudo bash /tmp/manage-admin-users.sh"
|
||||
```
|
||||
|
||||
### 3. Copy Nginx Configuration
|
||||
|
||||
```bash
|
||||
sudo cp nginx/posterg.conf /etc/nginx/sites-available/posterg
|
||||
sudo ln -s /etc/nginx/sites-available/posterg /etc/nginx/sites-enabled/
|
||||
sudo cp nginx/xamxam.conf /etc/nginx/sites-available/xamxam
|
||||
sudo ln -s /etc/nginx/sites-available/xamxam /etc/nginx/sites-enabled/
|
||||
sudo rm -f /etc/nginx/sites-enabled/default
|
||||
```
|
||||
|
||||
@@ -71,32 +71,32 @@ sudo systemctl status nginx
|
||||
|
||||
```bash
|
||||
# Should return 401
|
||||
curl -I https://posterg.erg.be/admin/
|
||||
curl -I https://xamxam.erg.be/admin/
|
||||
|
||||
# With credentials
|
||||
curl -u admin:password https://posterg.erg.be/admin/
|
||||
curl -u admin:password https://xamxam.erg.be/admin/
|
||||
```
|
||||
|
||||
### Test File Protection
|
||||
|
||||
```bash
|
||||
# Should return 403
|
||||
curl -I https://posterg.erg.be/storage/test.db
|
||||
curl -I https://posterg.erg.be/src/Database.php
|
||||
curl -I https://xamxam.erg.be/storage/test.db
|
||||
curl -I https://xamxam.erg.be/src/Database.php
|
||||
```
|
||||
|
||||
### Test Security Headers
|
||||
|
||||
```bash
|
||||
curl -I https://posterg.erg.be/ | grep -E "X-|Strict-Transport"
|
||||
curl -I https://xamxam.erg.be/ | grep -E "X-|Strict-Transport"
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### 403 Forbidden on admin
|
||||
```bash
|
||||
sudo ls -l /etc/nginx/.htpasswd-posterg
|
||||
sudo chmod 644 /etc/nginx/.htpasswd-posterg
|
||||
sudo ls -l /etc/nginx/.htpasswd-xamxam
|
||||
sudo chmod 644 /etc/nginx/.htpasswd-xamxam
|
||||
```
|
||||
|
||||
### 502 Bad Gateway
|
||||
@@ -114,7 +114,7 @@ sudo nginx -t
|
||||
|
||||
### Change Admin Password
|
||||
```bash
|
||||
sudo htpasswd /etc/nginx/.htpasswd-posterg admin
|
||||
sudo htpasswd /etc/nginx/.htpasswd-xamxam admin
|
||||
```
|
||||
|
||||
### Reload Configuration
|
||||
|
||||
Reference in New Issue
Block a user