.

บิด Nginx ให้บริการชื่อโดเมนนาน - VPS ไบเบิล # 15

English อังกฤษ (การเปลี่ยนแปลง)
  • Digg
  • Twitter
  • Technorati
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • LinkedIn
  • email

แก้ไข / เพิ่ม server_names_hash_bucket_size

ภาพเซิร์ฟเวอร์ชื่อ-ยุ่งเหยิง-ถัง

หากคุณใช้ nginx และชื่อโดเมนของคุณเกิน 32 ตัวอักษรที่คุณอาจได้รับข้อความแสดงข้อผิดพลาดเมื่อคุณเริ่มต้นเว็บเซิร์ฟเวอร์.

จะค่อนข้างคุณต้องบอก nginx ให้การอีกชื่อโดเมน.

โดยให้เปิดไฟล์ config ของคุณ. ให้คุณติดตั้ง Nginx ใช้ผู้จัดการแพคเกจคุณสามารถใช้กับ: --

ตั้ง VPS Unmanaged (4 Newbies) .. พระคัมภีร์ VPS

ใน 20 สำเนา / ขั้นตอนวาง .. จากศูนย์ให้พระเอกช่องว่างที่น่ารัก-เป็นเซิร์ฟเวอร์ Linux.

เลื่อนลงสำหรับดัชนีชุดเต็ม.

ดังนั้นเดี๋ยวก่อนโรงสาธารณะและขอให้มีอายุยืนยาวเสมือน! หวังช่วย. The_guv

sudo nano /etc/nginx/nginx.conf

For others, who compiled from source:-

sudo nano /usr/local/nginx/conf/nginx.conf

.. and in there, within the http section, that looks like this ..

http {
#various settings here
}
Just add this line:-
server_names_hash_bucket_size 64;

Save the file.

Reboot nginx:-

sudo /etc/init.d/nginx restart

And your longer domain name should work. If the name is longer than 64 characters, swap the '64' value for 128, but I pity your users :)


If you liked that ...
... maybe you'll like these?

.