Difference between revisions of "Guide/Server/de"

Jump to navigation Jump to search
3,015 bytes added ,  18:07, 3 December 2019
no edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Guide/de|Zurück]]
[[Guide/de|Zurück]] | [[Guide/Server|English]] | [[Guide/Server/de|Deutsch]]
 
----
= TCP / IP =
= TCP / IP =


Line 53: Line 53:
= Prosody =
= Prosody =


Prosody ist ein in Lua geschriebener XMPP Server unter der MIT Lizenz. https://prosody.im
Prosody ist ein in Lua geschriebener XMPP Server unter der MIT Lizenz. https://prosody.im.
Dokumentation findet man auf der Homepage: https://prosody.im/doc und bei den jeweiligen Modulen: https://modules.prosody.im/


Die Konfigurationsdateien sind in /etc/prosody/
Die Konfigurationsdateien sind in /etc/prosody/
Line 62: Line 63:


Für BOSH und WebSocket wird ein Web-Server als Proxy verwendet.
Für BOSH und WebSocket wird ein Web-Server als Proxy verwendet.
=== Apache 2 Proxy Setup ===


  a2enmod rewrite proxy proxy_http  # Module für BOSH
  a2enmod rewrite proxy proxy_http  # Module für BOSH
  a2enmod proxy proxy_wstunnel      # Module für WebSocket
  a2enmod proxy proxy_wstunnel      # Module für WebSocket


SSLProxyEngine on
Setup for HTTP Port 80. Rewrite to HTTPS.
<Location /http-bind>
 
    Order allow,deny
    <VirtualHost *:80>
    Allow from all
        ServerAdmin webmaster@domain.tld
</Location>
        DocumentRoot /var/www/domain.tld
RewriteEngine On
        ServerName www.domain.tld
RewriteRule ^/http-bind$ https://domain.tld:5281/http-bind [P,L]
        ServerAlias domain.tld
        ServerSignature Off
<IfModule mod_proxy.c>
        Header set Access-Control-Allow-Origin "*"
    <IfModule mod_proxy_wstunnel.c>
        RewriteEngine On
    ProxyTimeout 900
        RewriteCond %{HTTPS} !=on
    <Location "/xmpp-websocket">
        RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
        ProxyPreserveHost On
    </VirtualHost>
        ProxyPass "wss://domain.tld:5281/xmpp-websocket"
 
    </Location>
    <VirtualHost *:443>                                                                                                                                                                                               
    </IfModule>
        ServerAdmin webmaster@domain.tld
</IfModule>
        DocumentRoot /var/www/domain.tld
        ServerName www.domain.tld
        ServerAlias domain.tld
        ServerSignature Off                                               
        SSLEngine on                                                       
        SSLCertificateFile "/etc/ssl/certs/ssl-cert-snakeoil.pem"                             
        SSLCertificateKeyFile "/etc/ssl/private/ssl-cert-snakeoil.key"                                                                         
        ErrorLog ${APACHE_LOG_DIR}/error.log                                                                                               
        SSLProxyEngine on                                                          
  <Location /http-bind>                                                                      
      Order allow,deny                                                            
      Allow from all                                                                          
  </Location>                                                                    
  RewriteEngine On                              
  RewriteRule ^/http-bind$ https://domain.tld:5281/http-bind [P,L]
                                                   
    <IfModule mod_proxy.c>                                              
    <IfModule mod_proxy_wstunnel.c>                                
    ProxyTimeout 900                                                
        ProxyPreserveHost On                       
        ProxyPass /xmpp-websocket "wss://domain.tld:5281/ws"
    </IfModule>                                                          
    </IfModule>                                        
                         
    </VirtualHost>   
 
 
    <VirtualHost *:443>
        ServerAdmin webmaster@domain.tld
        DocumentRoot /var/www/domain.tld
        ServerName uploads.domain.tld
        ServerSignature Off
        SSLEngine on
        SSLCertificateFile "/etc/ssl/certs/ssl-cert-snakeoil.pem"
        SSLCertificateKeyFile "/etc/ssl/private/ssl-cert-snakeoil.key"
        ErrorLog ${APACHE_LOG_DIR}/error.log
        SSLProxyEngine on
        RewriteEngine On
        RewriteRule ^/upload/(.*) https://uploads.domain.tld:5281/upload/$1 [P,L]
    </VirtualHost>
 
=== cfg.lua ===
 
    Component "uploads.domain.tld" "http_upload"
    http_external_url = "https://uploads.domain.tld"
    http_upload_expire_after = 60 * 60 * 7
 


* https://prosody.im/doc/websocket
* https://prosody.im/doc/websocket
* https://prosody.im/doc/setting_up_bosh
* https://prosody.im/doc/setting_up_bosh


= Spam =
https://github.com/JabberSPAM/blacklist


[[Category:XMPP-DE]]
[[Category:Handbuch]]
[[Category:Handbuch]]
161

edits

Navigation menu