Using NodeBB as a commenting system (static site)

Technical Support

Suggested Topics


  • 0 Votes
    8 Posts
    539 Views

    Cannot upvote this enough!!

  • 0 Votes
    2 Posts
    337 Views

    Try the Ubuntu docs instead of the Debian docs. They're more up to date.

  • 0 Votes
    7 Posts
    1k Views

    So, with this configuration, it's ok !

    <VirtualHost *:80> ServerName mydomain.com ServerAdmin [email protected] DocumentRoot /var/www/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 # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example 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 <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^[^\/]*\/(.*) https://mydomain.com/$1 [R=301,L] </IfModule> RewriteCond %{SERVER_NAME} =mydomain.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost> <VirtualHost *:4567> ServerName subdomain.mydomain.com # Basic security headers Header always set X-Content-Type-Options "nosniff" Header always set X-Xss-Protection "1; mode=block" # NodeBB header RequestHeader set X-Forwarded-Proto "https" # Static file cache <FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css)$"> <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 14 days" Header set Cache-Control "public" </IfModule> </FilesMatch> ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> # Custom Error Document when NodeBB is offline ProxyPass /error-documents ! ErrorDocument 503 /error-documents/503.html Alias /error-documents path/to/nodebb/public # Websocket passthrough RewriteEngine On RewriteCond %{REQUEST_URI} ^/socket.io [NC] RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteRule /(.*) ws://localhost:4567/$1 [P,L] ProxyPass / http://localhost:4567/ ProxyPassReverse / http://localhost:4567/ # Log stuff ErrorLog ${APACHE_LOG_DIR}/nodebb-error.log CustomLog ${APACHE_LOG_DIR}/nodebb-access.log combined RewriteCond %{SERVER_NAME} =subdomain.mydomain.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost>

    The problem is that I had not put 2 different ServerName in the config, so all traffic was redirected and rewritten in HTTPS on the same ServerName : subdomain.mydomain.com

  • 0 Votes
    3 Posts
    1k Views

    Thanks! Pulling right now 🙂

    [EDIT] Seems to have solved it!

  • 0 Votes
    6 Posts
    3k Views

    @Xiph Thank you so much for the reply!

    We're not actually pulling images from Docker Hub, as the default image out there seems to just pull an 0.5 branch. We're actually building the image from source using the Dockerfile that is included.

    The info you included will be super helpful in getting this going the way we want. We will not be posting these images publicly, for the exact reasons you mentioned above (i.e. secret).

    I'll probably be back with more questions though. 😃