Assets missing on subfolder install

Technical Support
  • I hope it helps someone:

    I wanted to do this, so I landed upon this thread. I had already created nginx proxy for my domain. So I basically just added /discuss (or whatever location you want)

    server {
        listen 443;
        listen [::]:443;
        server_name site.com;
        
        access_log off;
        error_log /var/log/nginx/site.com-error.log;
        
        open_file_cache          max=2000 inactive=20s;
        open_file_cache_valid    60s;
        open_file_cache_min_uses 5;
        open_file_cache_errors   off;
        
        ######################################################################
        ## SSL Configuration
        ##
        ## Only use this block if you are setting up the SSL (HTTPS) server
        ## definition of your site.
        ######################################################################
        ssl on;
        ssl_certificate /etc/letsencrypt/live/site/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/site/privkey.pem;
                    
        ssl_session_timeout 5m;
                    
        ssl_protocols SSLv3 TLSv1;
        ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
        ssl_prefer_server_ciphers on;
                    
                    
            location /discuss
                    {
                    proxy_pass         http://127.0.0.1:4567/;
                    proxy_redirect     off;
                    proxy_set_header   Host             $host;
                    proxy_set_header   X-Real-IP        $remote_addr;
                    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                    proxy_set_header X-Forwarded-Proto $scheme;
                    }
        # Custom 404
        error_page 404 = /404.html;
    
    }
    

    However, there are many other issues.

    If I specify in config.json url as site.com/forum or something, css files don't load.

    If I don't, if you click on anything, it will try to go to site.com/post/2/something instead of site.com/forum/post/2 etc.


Suggested Topics