Langutor: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „= Links = * https://www.itsolutionstuff.com/post/how-to-install-bootstrap-in-laravelexample.html = Zielsetzung = Das Projekt Langutor beinhaltet eine Webseite, generiert mit dem Framework Laravel. == Namensgebung == Ein Kunstwort aus Language und Tutor. = Einrichtung = == Installation Laravel + npm == <syntaxhighlight lang="bash"> apt install php-laravel-framework npm </syntaxhighlight> == Einrichten Projekt == <syntaxhighlight lang="bash"> PROJ=langu…“) |
|||
Zeile 23: | Zeile 23: | ||
composer require laravel/ui | composer require laravel/ui | ||
php artisan ui bootstrap --auth | php artisan ui bootstrap --auth | ||
dbtool create-db-and-user app$PROJ $PROJ topsecret | |||
</syntaxhighlight> | |||
* Anpassungen in .env | |||
<pre> | |||
... | |||
APP_URL=http://langutor.test | |||
... | |||
DB_DATABASE=applangutor | |||
DB_USERNAME=langutor | |||
DB_PASSWORD=topsecret | |||
</pre> | |||
<syntaxhighlight lang="bash"> | |||
npm install | npm install | ||
npm run dev | npm run dev | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== NGINX-Konfiguration == | |||
* /etc/nginx/sites-available/langutor.test | |||
<pre> | |||
server { | |||
listen 80; | |||
listen [::]:80; | |||
server_name langutor.test; | |||
root /home/ws/php/langutor/public; | |||
add_header X-Frame-Options "SAMEORIGIN"; | |||
add_header X-Content-Type-Options "nosniff"; | |||
index index.php; | |||
charset utf-8; | |||
location / { | |||
try_files $uri $uri/ /index.php?$query_string; | |||
} | |||
location = /favicon.ico { access_log off; log_not_found off; } | |||
location = /robots.txt { access_log off; log_not_found off; } | |||
error_page 404 /index.php; | |||
location ~ \.php$ { | |||
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; | |||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | |||
include fastcgi_params; | |||
} | |||
location ~ /\.(?!well-known).* { | |||
deny all; | |||
} | |||
} | |||
</pre> |
Version vom 19. September 2023, 08:47 Uhr
Links
Zielsetzung
Das Projekt Langutor beinhaltet eine Webseite, generiert mit dem Framework Laravel.
Namensgebung
Ein Kunstwort aus Language und Tutor.
Einrichtung
Installation Laravel + npm
apt install php-laravel-framework npm
Einrichten Projekt
PROJ=langutor
BASE=/home/ws/php/$PROJ
cd $(basename $BASE)
composer create-project laravel/laravel $PROJ
cd $BASE
composer require laravel/ui
php artisan ui bootstrap --auth
dbtool create-db-and-user app$PROJ $PROJ topsecret
- Anpassungen in .env
... APP_URL=http://langutor.test ... DB_DATABASE=applangutor DB_USERNAME=langutor DB_PASSWORD=topsecret
npm install
npm run dev
NGINX-Konfiguration
- /etc/nginx/sites-available/langutor.test
server { listen 80; listen [::]:80; server_name langutor.test; root /home/ws/php/langutor/public; add_header X-Frame-Options "SAMEORIGIN"; add_header X-Content-Type-Options "nosniff"; index index.php; charset utf-8; location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } error_page 404 /index.php; location ~ \.php$ { fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.(?!well-known).* { deny all; } }