목차
답글 내용:
백엔드 개발 PHP 튜토리얼 Alibaba Cloud에서 클라우드 서비스를 구입했는데 HTML을 어디에서 액세스할 수 있나요?

Alibaba Cloud에서 클라우드 서비스를 구입했는데 HTML을 어디에서 액세스할 수 있나요?

Dec 05, 2016 pm 01:44 PM
c# node.js php python ruby

다음은 내 서버 디렉토리입니다. test.html 파일을 작성했다면 어느 디렉토리에 업로드해야 하나요? 그렇다면 다른 사람들이 이 페이지에 접근하기 위해 어떤 경로를 사용할 수 있나요?
Alibaba Cloud에서 클라우드 서비스를 구입했는데 HTML을 어디에서 액세스할 수 있나요?

안 되는 것 같나요?
Alibaba Cloud에서 클라우드 서비스를 구입했는데 HTML을 어디에서 액세스할 수 있나요?

다음은 내 nginx 구성입니다

<code># For more information on configuration, see:
#   * Official English 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;
pid /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_bytes_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       80 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 500 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/private/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.
#        include /etc/nginx/default.d/*.conf;
#
#        location / {
#        }
#
#        error_page 404 /404.html;
#            location = /40x.html {
#        }
#
#        error_page 500 502 503 504 /50x.html;
#            location = /50x.html {
#        }
#    }

}

</code>
로그인 후 복사
로그인 후 복사

답글 내용:

다음은 내 서버 디렉토리입니다. test.html 파일을 작성했다면 어느 디렉토리에 업로드해야 하나요? 그렇다면 다른 사람들이 이 페이지에 접근하기 위해 어떤 경로를 사용할 수 있나요?
Alibaba Cloud에서 클라우드 서비스를 구입했는데 HTML을 어디에서 액세스할 수 있나요?

안 되는 것 같나요?
Alibaba Cloud에서 클라우드 서비스를 구입했는데 HTML을 어디에서 액세스할 수 있나요?

다음은 내 nginx 구성입니다

<code># For more information on configuration, see:
#   * Official English 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;
pid /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_bytes_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       80 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 500 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/private/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.
#        include /etc/nginx/default.d/*.conf;
#
#        location / {
#        }
#
#        error_page 404 /404.html;
#            location = /40x.html {
#        }
#
#        error_page 500 502 503 504 /50x.html;
#            location = /50x.html {
#        }
#    }

}

</code>
로그인 후 복사
로그인 후 복사

먼저 nginx나 apache 중 하나의 서버 환경을 설치
그런 다음 파일을 웹 디렉토리의 루트 디렉토리
마지막으로 브라우저에 서버 IP를 입력하세요

로컬 Unix 환경과 동일

저는 nodejs+nginx를 사용합니다

root /usr/share/nginx/html;
이 줄은 nginx 구성의 웹 루트 디렉터리를 설명합니다

/은 서버 시스템의 루트 디렉터리를 나타냅니다. 혼동하지 마세요.

먼저 질문에 대답하세요. 웹 서버가 필요합니다(nginx/apache도 허용됨)

해야 할 일: 먼저 nginx/apache를 로컬에 설치하고 실행한 다음 10분 동안 각 디렉터리의 역할을 이해합니다.

Nginx나 Apache 환경 중 익숙한 환경을 사용하세요. Nginx를 사용한다면 Nginx의 구성을 이해해야 합니다. 일반적으로 Nginx 환경에서 표시하려는 IP 주소, 포트, 파일 경로(즉, Nginx.conf 파일)를 구성해야 합니다. 그런 다음 Nginx를 다시 시작하십시오. 이것이 가장 간단한 구성 프로세스입니다

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

뜨거운 기사 태그

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

Ubuntu 및 Debian용 PHP 8.4 설치 및 업그레이드 가이드 Ubuntu 및 Debian용 PHP 8.4 설치 및 업그레이드 가이드 Dec 24, 2024 pm 04:42 PM

Ubuntu 및 Debian용 PHP 8.4 설치 및 업그레이드 가이드

DeepSeek Xiaomi를 다운로드하는 방법 DeepSeek Xiaomi를 다운로드하는 방법 Feb 19, 2025 pm 05:27 PM

DeepSeek Xiaomi를 다운로드하는 방법

PHP 개발을 위해 Visual Studio Code(VS Code)를 설정하는 방법 PHP 개발을 위해 Visual Studio Code(VS Code)를 설정하는 방법 Dec 20, 2024 am 11:31 AM

PHP 개발을 위해 Visual Studio Code(VS Code)를 설정하는 방법

당신은 그에게 Deepseek에게 어떻게 물어 봐요 당신은 그에게 Deepseek에게 어떻게 물어 봐요 Feb 19, 2025 pm 04:42 PM

당신은 그에게 Deepseek에게 어떻게 물어 봐요

DeepSeek을 검색하는 방법 DeepSeek을 검색하는 방법 Feb 19, 2025 pm 05:18 PM

DeepSeek을 검색하는 방법

PHP에서 HTML/XML을 어떻게 구문 분석하고 처리합니까? PHP에서 HTML/XML을 어떻게 구문 분석하고 처리합니까? Feb 07, 2025 am 11:57 AM

PHP에서 HTML/XML을 어떻게 구문 분석하고 처리합니까?

DeepSeek을 프로그래밍하는 방법 DeepSeek을 프로그래밍하는 방법 Feb 19, 2025 pm 05:36 PM

DeepSeek을 프로그래밍하는 방법

문자열로 모음을 계산하는 PHP 프로그램 문자열로 모음을 계산하는 PHP 프로그램 Feb 07, 2025 pm 12:12 PM

문자열로 모음을 계산하는 PHP 프로그램

See all articles