Set URL Path to site.com/atom

86 views
Skip to first unread message

Carlos Ciliberti

unread,
Sep 10, 2023, 4:02:46 PM9/10/23
to AtoM Users
Hello,

I set up a reverse nginx reverse-proxy and everything is working fine but some AtoM files are not loading. I'm guessing this is because the path (location) doesn't match AtoM's configuration. 

This is my nginx reverse-proxy config:

server {
    listen 443 ssl;
    server_name sitio.com;
   
    ssl_certificate /path;
    ssl_certificate_key /path;

    location /cloud/ {
        proxy_pass https://ip:port;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
   
     location /atom/ {
        proxy_pass https://ip:port;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}




atom.jpg

Dan Gillean

unread,
Sep 11, 2023, 8:48:07 AM9/11/23
to ica-ato...@googlegroups.com

Hi Carlos, 

I'll try to ask a system administrator for input, but it's possible that the theme assets just need to be recompiled - your screenshot is exactly what AtoM looks like when this happens, so let's try that first. In the current Bootstrap 2 themes, we use lessc to minimize all the stylesheets. In the downloadable tarball we precompile these, but if you follow option 2 in our installation instructions (install from our code repository), you need to install a few more dependencies and then manually compile the theme assets. Here's the block: 
  • sudo apt install npm make
  • sudo npm install -g "less@<4.0.0" n
  • sudo n stable
  • sudo npm install
  • sudo npm run build
  • sudo make -C /usr/share/nginx/atom/plugins/arDominionPlugin
  • sudo make -C /usr/share/nginx/atom/plugins/arArchivesCanadaPlugin
  • sudo rm -rf node_modules
It's at the very end of this section of the installation docs: 
Note that, even if you followed Option 1 and installed from our downloadable tarball, recompiling the theme can still sometimes be necessary. After running the above, I would 

A couple other notes: 

First, node and npm *should* be included with Ubuntu 20.04, but if for some reason you get an error on the very first command above, you can install nodejs following the instructions here: 
It also might be a good idea to clear all caches before double-checking if the above worked. First, let's clear the Symfony cache. From the AtoM installation directory (i.e. typically /usr/share/nginx/atom), run: 
PPHP-FPM has its own cache so let's restart that as well. If you are running AtoM 2.7, then you should have PHP 7.4 installed: 
Let us know if that helps! Otherwise, I will see what our system administrators suggest. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/a6278dfe-bd6a-4140-b0ad-5dd06c8b793en%40googlegroups.com.

Carlos Ciliberti

unread,
Sep 11, 2023, 1:22:01 PM9/11/23
to AtoM Users
Dan, thank you for replying so quickly.
My AtoM install was working just fine. I used "Option 1: Download the tarball". Unfortunately, when I configure the server to load AtoM at "site.com/atom" it stops working (shown in the screenshot above). I tried to compile the themes and then realized I cannot do that anymore, can I? But then again the site is working fine at "site.com". I think it has something to do that AtoM tries to load the files from the main domain name and not some random /...directory.../ I configured.

José Raddaoui

unread,
Sep 11, 2023, 1:30:04 PM9/11/23
to AtoM Users
Hi Carlos,

In your Nginx configuration for AtoM you are missing a lot of the locations that need to be configured. Check the example config from the documentation:


For this particular case, it's the following rule the one that allows access to those files bypassing the proxy:

location ~* ^/(css|dist|js|images|plugins|vendor)/.*\.(css|png|jpg|js|svg|ico|gif|pdf|woff|ttf)$ { }Best regards,
Radda.

Carlos Ciliberti

unread,
Sep 11, 2023, 3:34:31 PM9/11/23
to AtoM Users
Actually, nothing is working. Links, login, I get 404 Not Found. Everything is calling the base URL.

Dan Gillean

unread,
Sep 12, 2023, 8:33:27 AM9/12/23
to ica-ato...@googlegroups.com
Hi Carlos, 

What output is returned if you run the configtest for Nginx?
  • sudo nginx -t
Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Carlos Ciliberti

unread,
Sep 12, 2023, 10:51:19 AM9/12/23
to AtoM Users
Dan, hello,

This is the output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

José Raddaoui

unread,
Sep 12, 2023, 11:56:36 AM9/12/23
to AtoM Users
Hi Carlos,

You will need all locations from the example Nginx configuration to properly serve and secure your site. By having that atom path you may need to overwrite some of those conditions to match. If it's possible for you, I'd suggest to use different subdomains instead of paths to differentiate both sites (eg: cloud.sitio.com and atom.sitio.com) and keep the AtoM config like the example from the documentation.

Best regards,
Radda.

Carlos Ciliberti

unread,
Sep 13, 2023, 1:36:21 AM9/13/23
to AtoM Users

Hello José,

I want to express my gratitude for your assistance. I'm currently uncertain about how to implement the changes in the Nginx location blocks.

I did consider using subdomains; however, our server is presently reliant on a free DDNS service that does not offer support for subdomains.

I stumbled upon this older discussion thread at https://groups.google.com/g/ica-atom-users/c/f_qbD8gIclQ/m/DcO3cu5UBgAJ, where Darryl Friesen seemed to have resolved a similar issue, at least it appears that way. I admit I don't fully comprehend the steps he took to address this problem, but I intend to conduct a thorough investigation into it. I'll provide an update if I encounter any difficulties.

Thank you once again for your assistance.

Best regards,

Carlos.

Reply all
Reply to author
Forward
0 new messages