Listen 4080 # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. ServerAdmin logicmoo@gmail.com ServerName logicmoo.org DocumentRoot /opt/logicmoo_workspace/html # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined DirectoryIndex index.html index.htm index.php welcome.html Options +Indexes AllowOverride All Options FollowSymLinks Options SymLinksIfOwnerMatch Order allow,deny Allow from all Require all granted # For most configuration files from conf-available/, which are # enabled or disabled at a global level, its is possible to # include a line for only one particular virtual host. For prologmoo the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf AddType text/html .php .phps #SSLCertificateFile /etc/letsencrypt/live/logicmoo.org/fullchain.pem #SSLCertificateKeyFile /etc/letsencrypt/live/logicmoo.org/privkey.pem #Include /etc/letsencrypt/options-ssl-apache.conf RewriteEngine On #RewriteBase "/" #RewriteCond "%{HTTP_HOST}" "^logicmoo\.org$" [NC] #RewriteRule "^(.*)" "https://www.logicmoo.org/index.html" [R=301,L,QSA] #RewriteRule "^(.*)\.ht$" "index.php?nav=$1 [NC,L,QSA,CO=RewriteRule:01:https://logicmoo.org:3020/:SameSite=None:Secure] #RewriteRule "^(.*)\.htm$" "index.php?nav=$1 [NC,L,QSA,CO=RewriteRule:02:https://logicmoo.org:3020/:SameSite=None:Secure] #RewriteRule "^(.*)\.html$" "index.php?nav=$1 [NC,L,QSA,CO=RewriteRule:03:https://logicmoo.org:3020/:SameSite=None:Secure] #[...] #RewriteRule "^admin/(.*)\.html$" "admin/index.php?nav=$1 [NC,L,QSA,CO=RewriteRule:09:https://www.logicmoo.org:3020/:SameSite=Strict:Secure] ProxyPreserveHost on RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC] RewriteRule .* ws://%{HTTP_HOST}:3100%{REQUEST_URI} [P] ProxyPass /butterfly/ http://%{HTTP_HOST}:3100 ProxyPassReverse /butterfly/ http://%{HTTP_HOST}:3100 ProxyPass /port3100 http://%{HTTP_HOST}:3100 ProxyPass /port3101 http://%{HTTP_HOST}:3101 ProxyPass /port3123 http://%{HTTP_HOST}:3123 ProxyPassReverse /port3100 http://%{HTTP_HOST}:3100 ProxyPassReverse /port3101/ http://%{HTTP_HOST}:3101/ ProxyPassReverse /port3123/ http://%{HTTP_HOST}:3123/ #ProxyPass /static/ http://%{HTTP_HOST}:3020/static/ #ProxyPass /ctl/ http://%{HTTP_HOST}:3100/ctl/ #ProxyPassReverse /ctl/ http://%{HTTP_HOST}:3100/ctl/ #ProxyPassReverse /ws/ http://%{HTTP_HOST}:3100/ws/ ProxyPass /assets http://%{HTTP_HOST}:3020/assets ProxyPass /cpack http://%{HTTP_HOST}:3020/cpack ProxyPass /css http://%{HTTP_HOST}:3020/css ProxyPass /dashboard http://%{HTTP_HOST}:3020/dashboard ProxyPass /e/ http://%{HTTP_HOST}:3020/e/ ProxyPass /filesystem http://%{HTTP_HOST}:3020/filesystem ProxyPass /flint http://%{HTTP_HOST}:3020/flint ProxyPass /help http://%{HTTP_HOST}:3020/help ProxyPass /home http://%{HTTP_HOST}:3020/home ProxyPass /home/ http://%{HTTP_HOST}:3020/home ProxyPass /icons http://%{HTTP_HOST}:3020/icons ProxyPass /js http://%{HTTP_HOST}:3020/js ProxyPass /local.js http://%{HTTP_HOST}:3100/local.js ProxyPass /logicmoo/ http://%{HTTP_HOST}:3020/logicmoo/ ProxyPass /login http://%{HTTP_HOST}:3020/login ProxyPass /openid http://%{HTTP_HOST}:3020/openid ProxyPass /pengine http://%{HTTP_HOST}:3020/pengine ProxyPass /prologmud http://%{HTTP_HOST}:3020/prologmud ProxyPass /sparql http://%{HTTP_HOST}:3020/sparql ProxyPass /static http://%{HTTP_HOST}:3020/static ProxyPass /swish http://%{HTTP_HOST}:3020/swish ProxyPass /user http://%{HTTP_HOST}:3020/user ProxyPass /users http://%{HTTP_HOST}:3020/users ProxyPass /yasgui http://%{HTTP_HOST}:3020/yasgui ProxyPassReverse /static/ http://%{HTTP_HOST}:3020/static/ RewriteCond "$1.php" -f RewriteCond "$1.html" !-f RewriteRule "^(.*).html$" "$1.php" RewriteCond %{REQUEST_URI} ^/$ [OR] RewriteCond %{REQUEST_URI} ^/downloads.* [OR] RewriteCond %{REQUEST_URI} ^/index.*$ [OR] RewriteCond %{REQUEST_URI} ^/welcome.*$ [OR] RewriteCond %{DOCUMENT_ROOT}/$1 -f [OR] RewriteCond %{DOCUMENT_ROOT}/$1 -d [OR] RewriteCond %{DOCUMENT_ROOT}/$1 -l RewriteRule (.*) - [S,L] ProxyPassReverse / http://%{HTTP_HOST}:4080 ProxyPassReverse / https://%{HTTP_HOST}:4080 ProxyPassReverse / http://%{HTTP_HOST} ProxyPassReverse / https://%{HTTP_HOST} ProxyPassReverse / http://logicmoo.org:3020 ProxyPassReverse / http://gitlab.logicmoo.org:3020 #RewriteCond %{HTTP_HOST} !^gitlab\.logicmoo\.org$ #RewriteRule ^(.*)$ "http\:\/\/gitlab\.logicmoo\.org\/" [R=302] # RewriteCond %{HTTP:Connection} Upgrade [NC] # RewriteCond %{HTTP:Upgrade} websocket [NC] # RewriteRule /(.*) ws://%{HTTP_HOST}:3020/$1 [P,L] #RewriteLog /var/log/apache/server2.rewrite.log #RewriteLogLevel 4 LogLevel alert rewrite:trace3 #RewriteRule /jhub/(.*) ws://%{HTTP_HOST}:8000/$1 [P,L] #RewriteRule /jhub/(.*) http://%{HTTP_HOST}:8000/$1 [P,L] #ProxyPass /jhub/ http://%{HTTP_HOST}:8000/ #ProxyPassReverse /jhub/ http://%{HTTP_HOST}:8000/ RewriteCond %{REQUEST_URI} !^/3020.* RewriteCond %{REQUEST_URI} !^/port.* RewriteCond %{REQUEST_URI} !^/stat.* RewriteCond %{REQUEST_URI} !^/butt.* RewriteCond %{REQUEST_URI} !^/local.js RewriteCond %{REQUEST_URI} !^/ctl.* RewriteCond %{REQUEST_URI} !^/ws.* RewriteCond %{REQUEST_URI} !^/ef.* RewriteCond %{REQUEST_URI} !^/$ RewriteCond %{REQUEST_URI} !^.*/index.*$ RewriteCond %{REQUEST_URI} !^.*/welcome.*$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l RewriteRule "^/(.*)" "http://%{HTTP_HOST}:3020/$1" [P,L] # ProxyPassReverse "/" "http://%{HTTP_HOST}:3020/