IT 인프라/리눅스, 가상화
[Linux] ubuntu 22.04 index.html 지정 (apache, nginx, caddy)
전재혁
2024. 3. 4. 10:30
Apache2 index.html 파일 경로 지정
•Vi /etc/apache2/site-enabled/000default 파일 접속

•DocumentRoot: 루트 지정 (/home/www/apach2/)
•Directoryindex: 루트 파일 안의 index파일 지정 (apache2.html)
Nginx- index 지정

•Vi /etc/nginx/site-enabled/default 파일 접속
•Root 지시문에 디렉토리 경로 입력 (/home/www/nginx/;)
•Index 지시문에 index 파일 이름 입력 (nginx.html;)
Caddy- index 지정

•Vi /etc/caddy/Caddyfile 명령어를 통해 파일 접속
•Root 지시문에 경로 입력 (/home/www/caddy/)
•Try_files 지시문 입력 후 index 파일 이름 입력 (caddy.html)