I bought a cloud service on Alibaba Cloud, where can I upload HTML to access?

Source: Internet
Author: User
Tags sendfile

Below is my server directory, if I have a well-written test.html file, I want to upload it to which directory? Then what kind of path can someone use to access this page?

Doesn't seem to work, does it?

Here is the configuration of my Nginx

# For more information on configuration, see:# * Official 中文版 documentation:http://nginx.org/en/docs/# * official Russian Documentation:http://nginx.org/ru/docs/user nginx;worker_processes Auto;error_log/var/log/nginx/error.log ;p id/run/nginx.pid;# Load dynamic modules. see/usr/share/nginx/readme.dynamic.include/usr/share/nginx/modules/*.conf;events {worker_connections 1024;} HTTP {log_format main ' $remote _addr-$remote _user [$time _local] "$request" ' $status $body _by    Tes_sent "$http _referer" "$http _user_agent" "$http _x_forwarded_for";    Access_log/var/log/nginx/access.log main;    Sendfile on;    Tcp_nopush on;    Tcp_nodelay on;    Keepalive_timeout 65;    Types_hash_max_size 2048;    Include/etc/nginx/mime.types;    Default_type Application/octet-stream;    # Load Modular configuration files from THE/ETC/NGINX/CONF.D directory. # See Http://nginx.org/en/docs/ngx_core_module.html#include # for more information.    include/etc/nginx/conf.d/*.conf;        server {Listen default_server;        Listen [::]:80 default_server;        server_name _;        root/usr/share/nginx/html;        # Load configuration files for the default server block.        include/etc/nginx/default.d/*.conf;        Location ~ ^/wechat/.+ {Proxy_pass http://127.0.0.1:3000;            } error_page 404/404.html;            Location =/40x.html {} error_page 502 503 504/50x.html; Location =/50x.html {}}# Settings for a TLS enabled server.## server {# Listen 443 SSL HTTP2 default_server;# Listen [::]:443 SSL http2 default_server;# server_name _;# root/usr/ share/nginx/html;## ssl_certificate "/etc/pki/nginx/server.crt"; # Ssl_certificate_key "/etc/pki/nginx/privat E/server.key "; # Ssl_session_cache shared:ssl:1m;# ssl_session_timeout 10m;# ssl_ciphers high:!anull:! md5;# ssl_prefer_server_ciphers on;## # Load configuration files for the default server block.# inclu de/etc/nginx/default.d/*.conf;## location/{#}## error_page 404/404.html;# location = /40x.html {#}## Error_page 502 503 504/50x.html;# location =/50x.html {#}#}}

Reply content:

Below is my server directory, if I have a well-written test.html file, I want to upload it to which directory? Then what kind of path can someone use to access this page?

Doesn't seem to work, does it?

Here is the configuration of my Nginx

# For more information on configuration, see:# * Official 中文版 documentation:http://nginx.org/en/docs/# * official Russian Documentation:http://nginx.org/ru/docs/user nginx;worker_processes Auto;error_log/var/log/nginx/error.log ;p id/run/nginx.pid;# Load dynamic modules. see/usr/share/nginx/readme.dynamic.include/usr/share/nginx/modules/*.conf;events {worker_connections 1024;} HTTP {log_format main ' $remote _addr-$remote _user [$time _local] "$request" ' $status $body _by    Tes_sent "$http _referer" "$http _user_agent" "$http _x_forwarded_for";    Access_log/var/log/nginx/access.log main;    Sendfile on;    Tcp_nopush on;    Tcp_nodelay on;    Keepalive_timeout 65;    Types_hash_max_size 2048;    Include/etc/nginx/mime.types;    Default_type Application/octet-stream;    # Load Modular configuration files from THE/ETC/NGINX/CONF.D directory. # See Http://nginx.org/en/docs/ngx_core_module.html#include # for more information.    include/etc/nginx/conf.d/*.conf;        server {Listen default_server;        Listen [::]:80 default_server;        server_name _;        root/usr/share/nginx/html;        # Load configuration files for the default server block.        include/etc/nginx/default.d/*.conf;        Location ~ ^/wechat/.+ {Proxy_pass http://127.0.0.1:3000;            } error_page 404/404.html;            Location =/40x.html {} error_page 502 503 504/50x.html; Location =/50x.html {}}# Settings for a TLS enabled server.## server {# Listen 443 SSL HTTP2 default_server;# Listen [::]:443 SSL http2 default_server;# server_name _;# root/usr/ share/nginx/html;## ssl_certificate "/etc/pki/nginx/server.crt"; # Ssl_certificate_key "/etc/pki/nginx/privat E/server.key "; # Ssl_session_cache shared:ssl:1m;# ssl_session_timeout 10m;# ssl_ciphers high:!anull:! md5;# ssl_prefer_server_ciphers on;## # Load configuration files for the default server block.# inclu de/etc/nginx/default.d/*.conf;## location/{#}## error_page 404/404.html;# location = /40x.html {#}## Error_page 502 503 504/50x.html;# location =/50x.html {#}#}}

Install the server environment first, either Nginx or Apache.
Then pass the file to the root of the Web directory
Finally, enter the server IP in the browser

Same as your local UNIX environment

I use Nodejs+nginx.

root /usr/share/nginx/html;
This line illustrates the Web root of your nginx configuration

And your This / represents the root directory of your server system, do not confuse the

Answer the question first: you need a Web server (Nginx/apache)

What you need to do: Start with a local nginx/apache run, and then spend 10 minutes understanding the role of each directory.

Nginx or Apache environment to see which one you are familiar with. Using Nginx, you need to understand the configuration problem of Nginx, in general you need to put your IP address and port, as well as the file path you want to show in the Nginx environment (that is, the nginx.conf file), and then restart Nginx to make it effective, this is the simplest configuration process

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.