Error while running nginx


#22

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


#23

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


#24

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


#25

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.


#26

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.


#27

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

This is output when I browse my LMS with IP.
image

This is my LMS Config file: http://dpaste.com/0X243SD

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:http://dpaste.com/2REN5Q2

Please suggest.


#28

Hi,

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)


#29

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


#30

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


#31

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 TimeandDate.com and will do it.

Also So I am commenting this much code:

server {
    if ($host = www.millionlightsdev.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


  server_name www.millionlightsdev.com;


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

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


}

#32

Yes…

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 https://www.timeanddate.com/worldclock/@4192289, just to save some time searching :slightly_smiling_face:


#33

Thanks mate


#34

No luck stevenzhu.

Let me know if you can.


#35

stevenzhu. No luck

Let me know if you can.


#36

Okay…

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


#37

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


#38

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

sudo nginx -t


#39

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
mlopenedx@MillionEdx:~$

#40

Okay… now you could restart Nginx with no error.

sudo systemctl restart nginx

And the https site should be working…

Thank you


#41

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.