Server/srs27: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
KKeine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
== Betriebssystem == | == Betriebssystem == | ||
: [[Server/srs1337]] | : [[Server/srs1337]] | ||
Zeile 9: | Zeile 7: | ||
* (verschiedener einfacher) Web-foo (ohne Datenbank) | * (verschiedener einfacher) Web-foo (ohne Datenbank) | ||
** [[Server/Candy]] | ** [[Server/Candy]] | ||
**: WUI | **: WUI für [[XMPP]] mit [[JavaScript]] | ||
*** (https://chat.htw.stura-dresden.de) | *** [[Jabber#Multi-User Chat StuRa web interface]] | ||
*** (http://chat.htw.stura-dresden.de) | *** (https://www.chat.htw.stura-dresden.de) | ||
*** (http://www.chat.htw.stura-dresden.de) | |||
*; möglicher weiterer Verwendungszweck: | |||
** landing page ([[StuRa Dresden]]) | ** landing page ([[StuRa Dresden]]) | ||
*** (https://stura-dresden.de) | |||
*** (https://www.stura-dresden.de) | *** (https://www.stura-dresden.de) | ||
--> | |||
== Allgemein == | |||
pkg upgrade -y | |||
pkg install -y zsh bash | |||
<pre> | |||
Message from bash-4.3.42_1: | |||
====================================================================== | |||
bash requires fdescfs(5) mounted on /dev/fd | |||
If you have not done it yet, please do the following: | |||
mount -t fdescfs fdesc /dev/fd | |||
To make it permanent, you need the following lines in /etc/fstab: | |||
fdesc /dev/fd fdescfs rw 0 0 | |||
====================================================================== | |||
</pre> | |||
pkg install -y tmux | |||
pkg install -y vim-lite nano | |||
== Webserver == | |||
pkg install -y apache24 | |||
<pre> | |||
Message from apache24-2.4.20_1: | |||
To run apache www server from startup, add apache24_enable="yes" | |||
in your /etc/rc.conf. Extra options can be found in startup script. | |||
Your hostname must be resolvable using at least 1 mechanism in | |||
/etc/nsswitch.conf typically DNS or /etc/hosts or apache might | |||
have issues starting depending on the modules you are using. | |||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |||
- apache24 default build changed from static MPM to modular MPM | |||
- more modules are now enabled per default in the port | |||
- icons and error pages moved from WWWDIR to DATADIR | |||
If build with modular MPM and no MPM is activated in | |||
httpd.conf, then mpm_prefork will be activated as default | |||
MPM in etc/apache24/modules.d to keep compatibility with | |||
existing php/perl/python modules! | |||
Please compare the existing httpd.conf with httpd.conf.sample | |||
and merge missing modules/instructions into httpd.conf! | |||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |||
</pre> | |||
sysrc apache24_enable=yes | |||
<pre> | |||
apache24_enable: -> yes | |||
</pre> | |||
: <code>service apache24 start</code> | |||
: <code>cd /tmp && fetch -q http://141.56.50.27/index.html && cat index.html | grep "It works" && rm index.html</code> | |||
<pre> | |||
<html><body><h1>It works!</h1></body></html> | |||
</pre> | |||
: <code>service apache24 stop</code> | |||
<!-- | |||
; das übliche Verzeichnis für Daten für den Webserver (hier Apache 2.4) nicht mehr nutzen: | |||
: <code>$EDITOR /usr/local/etc/apache24/httpd.conf</code> | |||
<pre></pre> | |||
<pre> | |||
#DocumentRoot "/usr/local/www/apache24/data" | |||
#<Directory "/usr/local/www/apache24/data"> | |||
# | |||
# Possible values for the Options directive are "None", "All", | |||
# or any combination of: | |||
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews | |||
# | |||
# Note that "MultiViews" must be named *explicitly* --- "Options All" | |||
# doesn't give it to you. | |||
# | |||
# The Options directive is both complicated and important. Please see | |||
# http://httpd.apache.org/docs/2.4/mod/core.html#options | |||
# for more information. | |||
# | |||
# Options Indexes FollowSymLinks | |||
# | |||
# AllowOverride controls what directives may be placed in .htaccess files. | |||
# It can be "All", "None", or any combination of the keywords: | |||
# AllowOverride FileInfo AuthConfig Limit | |||
# | |||
# AllowOverride None | |||
# | |||
# Controls who can get stuff from this server. | |||
# | |||
# Require all granted | |||
#</Directory> | |||
</pre> | |||
<pre></pre> | |||
; Zulassen der Verwaltung vom Webserver (hier Apache 2.4) mit Einträgen in der Datei ''/usr/local/etc/apache24/extra/httpd-vhosts.conf'' | |||
: <code>$EDITOR /usr/local/etc/apache24/httpd.conf</code> | |||
<pre></pre> | |||
<pre> | |||
# Virtual hosts | |||
#Include etc/apache24/extra/httpd-vhosts.conf | |||
Include etc/apache24/extra/httpd-vhosts.conf | |||
</pre> | |||
<pre></pre> | |||
: <code>$EDITOR /usr/local/etc/apache24/extra/httpd-vhosts.conf</code> | |||
<pre></pre> | |||
<pre></pre> | |||
!--> | |||
; Dreckiges Einhängen vom Chat auf die Schnelle: | |||
mv /usr/local/www/apache24/data/index.html /usr/local/www/apache24/index.works.html | |||
rmdir /usr/local/www/apache24/data | |||
ln -s /usr/local/www/candy /usr/local/www/apache24/data | |||
service apache24 reload | |||
== Candy == | == Candy == | ||
* https://candy-chat.github.io/candy/ | * https://candy-chat.github.io/candy/ | ||
<s> | |||
; Eintrag der Verwaltung vom Webserver (hier Apache 2.4) mit Einträgen in der Datei ''/usr/local/etc/apache24/extra/httpd-vhosts.conf'' | |||
: <code>$EDITOR /usr/local/etc/apache24/extra/httpd-vhosts.conf</code> | |||
<pre></pre> | |||
<pre></pre> | |||
<pre> | |||
<VirtualHost www.chat.htw.stura-dresden.de:80> | |||
ServerAdmin web@stura.htw-dresden.de | |||
DocumentRoot "/usr/local/www/candy" | |||
ServerName www.chat.stura.htw-dresden.de | |||
ServerAlias www.chat.htw.stura-dresden.de | |||
ErrorLog "/var/log/candy-error_log" | |||
CustomLog "/var/log/candy-access_log" common | |||
<Directory "/usr/local/www/candy"> | |||
Require all granted | |||
</Directory> | |||
</VirtualHost> | |||
</pre> | |||
</s> | |||
==== Candy [[C3D2]] für den [[Jabber#Multi-User Chat StuRa|Multi-User Chat StuRa]] ==== | |||
: [[Jabber#Chat StuRa HTW Dresden]] | |||
* index.html | |||
** zum einfachen Anmelden mit einem beliebigen Nick erstellt | |||
** Nutzung von einem Server für XMPP ohne eine persönlichen Account zu haben | |||
** Zusammengebaut aus | |||
**: aus den Seiten | |||
**:* https://c3d2.de/candy/index.html | |||
**:* https://github.com/candy-chat/candy/blob/master/example/index.html | |||
**: und angepasst nach | |||
**:* [https://candy-chat.github.io/candy/#setup Candy Setup] | |||
**:. | |||
** Verwendung von Candy (vom C3D2) | |||
* www.login.form.html | |||
** beliebiger Name der Datei | |||
** Formular (HTML), um sich selbstbestimmt einen Nick (als Pseudonym) zu geben | |||
** Wechseln zum Chat (Candy) | |||
** für den Zweck zum Einbinden in einer anderen Website | |||
**: zum Beispiel [[Plone]] (als [[Website]] des [[StuRa]]) | |||
*** Ein Einbinden von Candy (vom C3D2) als iframe wird von allen "fremden" Domains unterbunden (etwa um [[wikipedia:de:Cross-Site-Scripting|XSS]] zu unterbinden). | |||
* www.chat.form.html | |||
** beliebiger Name der Datei | |||
** Verwendung von Candy (vom C3D2) | |||
** Verwenden eines möglichen (per URL) übergeben Namens als Nick | |||
**: zum Beispiel vom Formular www.login.form.html | |||
** Verwenden von einem beliebigen Nick, wenn nichts ordentlich (per URL) übergeben wurde | |||
[[Kategorie:Server]] | [[Kategorie:Server]] |
Aktuelle Version vom 27. September 2018, 22:14 Uhr
Betriebssystem[Bearbeiten]
- Server/srs1337
- Jail FreeNAS
- FreeBSD
Verwendungszweck[Bearbeiten]
- (verschiedener einfacher) Web-foo (ohne Datenbank)
- Server/Candy
- WUI für XMPP mit JavaScript
- möglicher weiterer Verwendungszweck
- landing page (StuRa Dresden)
- Server/Candy
Allgemein[Bearbeiten]
pkg upgrade -y
pkg install -y zsh bash
Message from bash-4.3.42_1: ====================================================================== bash requires fdescfs(5) mounted on /dev/fd If you have not done it yet, please do the following: mount -t fdescfs fdesc /dev/fd To make it permanent, you need the following lines in /etc/fstab: fdesc /dev/fd fdescfs rw 0 0 ======================================================================
pkg install -y tmux
pkg install -y vim-lite nano
Webserver[Bearbeiten]
pkg install -y apache24
Message from apache24-2.4.20_1: To run apache www server from startup, add apache24_enable="yes" in your /etc/rc.conf. Extra options can be found in startup script. Your hostname must be resolvable using at least 1 mechanism in /etc/nsswitch.conf typically DNS or /etc/hosts or apache might have issues starting depending on the modules you are using. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - apache24 default build changed from static MPM to modular MPM - more modules are now enabled per default in the port - icons and error pages moved from WWWDIR to DATADIR If build with modular MPM and no MPM is activated in httpd.conf, then mpm_prefork will be activated as default MPM in etc/apache24/modules.d to keep compatibility with existing php/perl/python modules! Please compare the existing httpd.conf with httpd.conf.sample and merge missing modules/instructions into httpd.conf! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
sysrc apache24_enable=yes
apache24_enable: -> yes
service apache24 start
cd /tmp && fetch -q http://141.56.50.27/index.html && cat index.html | grep "It works" && rm index.html
<html><body><h1>It works!</h1></body></html>
service apache24 stop
- Dreckiges Einhängen vom Chat auf die Schnelle
mv /usr/local/www/apache24/data/index.html /usr/local/www/apache24/index.works.html rmdir /usr/local/www/apache24/data ln -s /usr/local/www/candy /usr/local/www/apache24/data service apache24 reload
Candy[Bearbeiten]
- Eintrag der Verwaltung vom Webserver (hier Apache 2.4) mit Einträgen in der Datei /usr/local/etc/apache24/extra/httpd-vhosts.conf
$EDITOR /usr/local/etc/apache24/extra/httpd-vhosts.conf
<VirtualHost www.chat.htw.stura-dresden.de:80> ServerAdmin web@stura.htw-dresden.de DocumentRoot "/usr/local/www/candy" ServerName www.chat.stura.htw-dresden.de ServerAlias www.chat.htw.stura-dresden.de ErrorLog "/var/log/candy-error_log" CustomLog "/var/log/candy-access_log" common <Directory "/usr/local/www/candy"> Require all granted </Directory> </VirtualHost>
Candy C3D2 für den Multi-User Chat StuRa[Bearbeiten]
- index.html
- zum einfachen Anmelden mit einem beliebigen Nick erstellt
- Nutzung von einem Server für XMPP ohne eine persönlichen Account zu haben
- Zusammengebaut aus
- aus den Seiten
- und angepasst nach
- .
- Verwendung von Candy (vom C3D2)
- www.login.form.html
- beliebiger Name der Datei
- Formular (HTML), um sich selbstbestimmt einen Nick (als Pseudonym) zu geben
- Wechseln zum Chat (Candy)
- für den Zweck zum Einbinden in einer anderen Website
- Ein Einbinden von Candy (vom C3D2) als iframe wird von allen "fremden" Domains unterbunden (etwa um XSS zu unterbinden).
- www.chat.form.html
- beliebiger Name der Datei
- Verwendung von Candy (vom C3D2)
- Verwenden eines möglichen (per URL) übergeben Namens als Nick
- zum Beispiel vom Formular www.login.form.html
- Verwenden von einem beliebigen Nick, wenn nichts ordentlich (per URL) übergeben wurde