Error while running nginx


Then I restart nginx and all processes also but the error continues.


suggest me some way to figure out. Since I am experiencing this first time. Shall I check nginx log file or error.log file.


Strange thing is that I can access my Insights at IP:18110/ and I cant access LMS at IP.


Hello schoen,

Now There is no error “404 Not Found nginx”.

But it just shows: “This site can’t be reached”.

Please guide me so that I can browse LMS. I am not able to browse Admin panel also. Therefore, I cant proceed further for any step.


What error message do you see now, if any?

Will you post the configuration file again?

It would be good to know if there is any output visible in the nginx error log.


It seems there is 12 hours difference between our time.!

This is output when I browse my LMS with IP.

This is my LMS Config file:

This is the only line in nginx error.log file:
2018/06/14 06:26:27 [warn] 130204#130204: server name "/server/server-error.html" has suspicious symbols in /etc/nginx/sites-enabled/lms:233
This is the top and bottom of error.log.1 file of nginx:

Please suggest.



I think I found the error. However I’m not sure if that’s you added or added by mistake.

Please take a look at the end of your vHost file.
From line 220 - 234, those code seems to be useless and duplicate from above configs.
And, in line 230, it’s returning error code 504, which means connection timed out.

If you can, please temporarily comment out line 220-234 and restart Nginx.

Thank you

P.S. your vHost seems to be messed up. I’ll help you clean that up in the morning (my timezone. UTC-5, EDT)


Okay Will do it.
So Your TimeZone: UTC -5 :means USA/Canada TimeZone.
IF USA which one EST,CST,MST or PST?


EST. (Actually is in daylight saving time), so EDT


Thanks So much Friend. Can you tell me city and time you are available in morning. Means from city name I will directly figure out your time from and will do it.

Also So I am commenting this much code:

server {
    if ($host = {
        return 301 https://$host$request_uri;
    } # managed by Certbot


  # error pages
  error_page 504 /server/server-error.html;

#  listen 80 default_server;
    return 404; # managed by Certbot




Commenting this part of the code out and restart Nginx might help you get ride of the errors and the “timeout”

Also you have duplicated server name (which is hard to understand…)

P.S. I’m in, just to save some time searching :slightly_smiling_face:


Thanks mate


No luck stevenzhu.

Let me know if you can.


stevenzhu. No luck

Let me know if you can.



From the error logs, it seems that you are still missing semicolons from line 226 and 15…

Can you check if the real vHost file has “;” after the domain name? (At the end of line 226 & 15?)

Thank you


Yes its 15 & 227 which contain domain name.
I have given ";" there.


Then can you try run this command and share the output?

sudo nginx -t


Here it is:

mlopenedx@MillionEdx:~$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful


Okay… now you could restart Nginx with no error.

sudo systemctl restart nginx

And the https site should be working…

Thank you


Stevenzhu, I will tell you the complete scene:

I have my open edx instance on Azure VM. I am installing Insights on it. For that I need LMS SSO Insights configuration. So previously I had implemented that but that time LMS and Insights both were on IP addresses. But day before yesterday I used domain name for my LMS. So day before yesterday I could browse LMS with domain name. And then I obtained SSL certificate from Lets encrypt.
So after that I am not able to browse LMS neither with IP nor with domain name.
But strange thing is I can browse Insights with IP:18110/.
So, problem is now I want to configure LMS SSO Insights again with domain name( as previously I had done this with IP addresses). But I am as I am not able to log in to LMS and Admin page also. And without that I cant proceed.