Upload a new index.html to your private_html folder là gì năm 2024

Default document là file web mặc định mà khi truy cập vào website sẽ truy cập ngay vào file này mà không cần phải gõ gì thêm.

VD. index.html là file mặc định . domain website là abc.com. Thì truy cập //abc.com sẽ hiển thị nội dung của trang index.html

Nếu file index.html không được cấu hình default document thì cần phải truy cập //abc.com/index.html mới hiển thị nội dung file index.html

Điều này sẽ gây ra sự bất tiện, đây chính là lý do vi sao cần cấu hình default document

Lưu ý, file default document cần lưu tại thư mục gốc chứa web site [VD hosting sử dụng control panel, thư mục chứa website là httpdocs]

Mặc định trên IIS, các trang mặc định [default document] đã được set sẵn theo thứ tự ưu tiên từ trên xuống:

Index.html Index.htm Index.cfm Index.shtml Index.shtm Index.stm Index.php Index.php3 Index.asp Index.aspx Default.htm Default.asp Default.aspx

Tuy nhiên , nhiều lập trình viên muốn sử dụng các file khác, VD: home.aspx, trang-chu.html.

Để cấu hình default document, có thể thực hiện theo 1 trong 2 cách sau:

Cách 1: Cấu hình Default document trên control panel Plesk:

1. Login Plesk

Login Plesk theo đường link: //[tenmiencuaban]:8443

VD: Bạn đăng ký hosting theo tên miền pavietnam-demo.online và domain pavietnam-demo.online đã trỏ về IP của hosting thì link truy cập sẽ là //pavietnam-demo.online:8443

Joined Apr 11, 2005 Messages 15,140 Location GMT +7.00

  • 2

User Level Login in Directadmin -> Domain Administration -> Click on desired domain -> Check "Use a symbolic link from private_html to public_html - allows for same data in http and https" -> Save

yorambaron

New member

Joined Dec 30, 2010 Messages 6

  • 3

Reply

Thanks for your reply. Can this be done after the domain was already been created?

Should I copy the public_html to private_html, remove the public_html and then run the procedure that you suggested?

zEitEr

Super Moderator

Joined Apr 11, 2005 Messages 15,140 Location GMT +7.00

  • 4

    Thanks for your reply. Can this be done after the domain was already been created?

Yes, sure, anytime you want.

Should I copy the public_html to private_html, remove the public_html and then run the procedure that you suggested?

Nothing of that.

yorambaron

New member

Joined Dec 30, 2010 Messages 6

  • 5

Reply

Thanks, this solved the problem.

  • 6

Hello,

Is this a bug or something which is not fixed yet? Today I am facing this exact issue in one of my client account.

zEitEr

Super Moderator

Joined Apr 11, 2005 Messages 15,140 Location GMT +7.00

  • 7

DrectAdmin allows to have separate content for HTTP and HTTPS.

For new domains you might set:

Code:

/usr/local/directadmin/directadmin set default_private_html_link 1 restart

existing domains should be modified in DirectAdmin at user level.

related:

asyraf

New member

Joined Dec 26, 2021 Messages 1

  • 8

Hi,..

We are all ready to active SSL. Once we put //interdeals.com.my. How to change this page, upload a new index.html to your private_html folder

Chủ Đề