Preview button not working


Running Juniper here.

When I click on “Preview” button in Studio (trying to preview a yet unpublished unit) I get a 404 page not found error.

This is the URL that I get:

(my course is hosted in

I checked that my /edx/etc/lms.yml has a correct PREVIEW_LMS_BASE setting:


Same happens with studio.yml. I added to my local /etc/hosts file (I will add it to my DNS zone once I get it working)

Trying to know why I get that error, I also set the DEBUG_ACCESS variable to true here:

but I don’t know where is it logging the access messages (if it is logging anything at all…)
I checked all these files to no avail (no access information or errors happening there):

sudo tail -f /edx/var/log/supervisor/lms* /edx/var/log/lms/edx.log /edx/var/log/cms/edx.log /edx/var/log/nginx/error.log

So how can I make the PREVIEW button to work? Or how can I know why is it giving me a 404 error?



Not sure, but check the dates if the course is released and if that also does not work try publishing and then have a look.

Hi @chintan,

the course is released. I just added a new unit and wanted to preview it before publishing. It is my understanding that Preview’s aim is just to allow that (preview a unit before publishing). In fact, I’d also say that Preview should also allow to preview a unit that is in a course not yet released, shouldn’t it?

I’m wondering how could I debug why isn’t it working…

Okay, I usually just use the same domain as my main domain instead of adding preview in it.

Try that, but keep a trailing / in the end because without it there are some other pages which gives 404

Yep, I found your answer in this previous post, and tried to set

PREVIEW_LMS_BASE: <-- with a slash
LMS_BASE: <-- without a slash
but didn’t work. I’ll have to dig further in the code to figure out the reason of this behaviour…