Rename www subdirectories to full domain names
- www/www -> www/www.domain.de - www/api -> www/api.domain.de - www/game -> www/game.domain.de Each domain now has its own directory with public/ Document Root.
This commit is contained in:
30
README.md
30
README.md
@@ -21,14 +21,14 @@ skeleton/
|
|||||||
├── docs/ # Projektdokumentation
|
├── docs/ # Projektdokumentation
|
||||||
│ ├── doku/
|
│ ├── doku/
|
||||||
│ └── planung/
|
│ └── planung/
|
||||||
├── www/ # Subdomains
|
├── www/ # Subdomains (ein Verzeichnis pro Domain)
|
||||||
│ ├── api/ # api.domain.de
|
│ ├── www.domain.de/ # www.domain.de
|
||||||
│ │ └── public/ # Document Root
|
│ │ └── public/ # Document Root
|
||||||
│ │ └── index.php
|
│ │ └── index.php
|
||||||
│ ├── game/ # game.domain.de
|
│ ├── api.domain.de/ # api.domain.de
|
||||||
│ │ └── public/ # Document Root
|
│ │ └── public/ # Document Root
|
||||||
│ │ └── index.php
|
│ │ └── index.php
|
||||||
│ └── www/ # www.domain.de
|
│ └── game.domain.de/ # game.domain.de
|
||||||
│ └── public/ # Document Root
|
│ └── public/ # Document Root
|
||||||
│ └── index.php
|
│ └── index.php
|
||||||
└── README.md
|
└── README.md
|
||||||
@@ -43,10 +43,10 @@ skeleton/
|
|||||||
git clone https://git.shadow-land.de/madgerm/skeleton.git mein-projekt
|
git clone https://git.shadow-land.de/madgerm/skeleton.git mein-projekt
|
||||||
cd mein-projekt
|
cd mein-projekt
|
||||||
|
|
||||||
# 2. Subdomain-Verzeichnisse umbenennen
|
# 2. Domain-Verzeichnisse umbenennen (falls andere Domains gewünscht)
|
||||||
mv www/api www/meine-api-subdomain
|
mv www/www.domain.de www/meine-domain.de
|
||||||
mv www/game www/mein-game-subdomain
|
mv www/api.domain.de www/meine-api.domain.de
|
||||||
mv www/www www/meine-www-subdomain
|
mv www/game.domain.de www/mein-game.domain.de
|
||||||
|
|
||||||
# 3. README und Repo-Name anpassen
|
# 3. README und Repo-Name anpassen
|
||||||
# 4. Git init / remote setzen
|
# 4. Git init / remote setzen
|
||||||
@@ -62,8 +62,8 @@ Jedes `www/<subdomain>/public/` Verzeichnis ist der Document-Root für die jewei
|
|||||||
|
|
||||||
**Caddy Config Beispiel:**
|
**Caddy Config Beispiel:**
|
||||||
```
|
```
|
||||||
subdomain.domain.de {
|
www.meine-domain.de {
|
||||||
root * /srv/www/projekt/www/subdomain/public
|
root * /srv/www/projekt/www/www.meine-domain.de/public
|
||||||
php_fastcgi localhost:9000
|
php_fastcgi localhost:9000
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
@@ -71,11 +71,11 @@ subdomain.domain.de {
|
|||||||
|
|
||||||
## Subdomains
|
## Subdomains
|
||||||
|
|
||||||
| Verzeichnis | Subdomain | Beschreibung |
|
| Verzeichnis | Domain | Beschreibung |
|
||||||
|-------------|-----------|---------------|
|
|-------------|--------|---------------|
|
||||||
| `www/www/` | www.domain.de | Hauptseite |
|
| `www/www.domain.de/` | www.domain.de | Hauptseite |
|
||||||
| `www/api/` | api.domain.de | REST API |
|
| `www/api.domain.de/` | api.domain.de | REST API |
|
||||||
| `www/game/` | game.domain.de | Spielkomponente |
|
| `www/game.domain.de/` | game.domain.de | Spielkomponente |
|
||||||
|
|
||||||
## Docs
|
## Docs
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
* api.domain.de — REST API
|
* api.domain.de — REST API
|
||||||
*/
|
*/
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
$method = $_SERVER['REQUEST_METHOD'];
|
$method = $_SERVER['REQUEST_METHOD'];
|
||||||
|
|
||||||
switch ($method) {
|
switch ($method) {
|
||||||
case 'GET':
|
case 'GET':
|
||||||
echo json_encode(['status' => 'ok', 'message' => 'API läuft']);
|
echo json_encode(['status' => 'ok', 'message' => 'API läuft']);
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Game</title>
|
<title>game.domain.de</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Game</h1>
|
<h1>Game</h1>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Projekt</title>
|
<title>www.domain.de</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Willkommen</h1>
|
<h1>Willkommen</h1>
|
||||||
Reference in New Issue
Block a user