
제어판 없이 CentOS 6에 Nginx를 설치했습니다.다음 단계를 따르세요.
Nginx를 성공적으로 설치했습니다. 다음을 참조하세요.링크.
하지만 여전히 표시되지 않고 "찾을 수 없는 오류"가 표시되는 폴더가 있습니다. 위치는 다음과 같습니다: /var/www/html/multicraft
.
위의 링크가 Nginx에서 열리도록 하려면 이 문제를 어떻게 해결해야 합니까? Nginx는 폴더가 있지만 "404 찾을 수 없음"을 표시합니다.
조언해 주십시오. 이것은 내 Nginx 구성입니다.
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 62.141.42.165:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# allow all;
#}
}
답변1
다음과 같이 파일에 섹션을 추가해야 합니다.
location /multicraft {
root /var/www/html/multicraft;
index index.html index.htm;
}