Home > other >  Nginx configuration server_name but still can't access by domain name, could you tell me how to
Nginx configuration server_name but still can't access by domain name, could you tell me how to

Time:09-21




Visit http://59.110.214.248 no problem via IP, domain name management background display resolution also succeeded, but always cannot display the page http://www.hbyongxiang.top/, I just want to use the domain name to access the default page, nginx
Nginx configuration also:
# the user nobody;
Worker_processes 1;

# error_log logs/error. The log;
# error_log logs/error log notice;
# error_log logs/error. The log info;

# pid logs/nginx. Pid;


Events {
Worker_connections 1024;
}


HTTP {
. Include the mime types;
default_type application/octet-stream;

# log_format main '$remote_addr - $remote_user [$time_local] "$request"'
# '$$body_bytes_sent status "$http_referer"'
# '" $http_user_agent "" $http_x_forwarded_for"';

# access_log logs/access. Log the main;

Sendfile on;
# tcp_nopush on;

# keepalive_timeout 0;
Keepalive_timeout 65;

# gzip on;

Server {
listen 80;
Server_name www.hbyongxiang.top;

#charset koi8-r;

#access_log logs/host.access.log main;

The location/{
root html;
The index index. HTML index. HTM;
}

404/404 # error_page. HTML;

# redirect server error pages to the static page/50 x) HTML
#
Error_page 504/50, 500, 502, 503 x. HTML;
Location=/50 x) HTML {
root html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
# the location ~ \. PHP ${
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
# the location ~ \. PHP ${
# root HTML;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index. PHP;
# fastcgi_param SCRIPT_FILENAME/scripts $fastcgi_script_name;
# include fastcgi_params;
#}

# to deny access to...htaccess files, if the Apache 's document root
# concurs with nginx 's one
#
# the location ~/\. Ht {
# deny all;
#}
}


# another virtual host using mix of IP -, name, and port - -based configuration
#
# server {
# 8000; listen
# listen somename: 8080;
# server_name somename alias another. Alias;

# the location/{
# root HTML;
# index index. HTML index. HTM;
#}
#}


# HTTPS server
#
# server {
# 443; listen
# server_name localhost.

# SSL on;
# ssl_certificate cert. Pem;
# ssl_certificate_key cert. Key;

# ssl_session_timeout 5 m;

# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:! ANULL:! MD5;
# ssl_prefer_server_ciphers on;

# the location/{
# root HTML;
# index index. HTML index. HTM;
#}
#}

}


CodePudding user response:

How to solve the building Lord
  • Related