วันอังคารที่ 17 มีนาคม พ.ศ. 2552

drupal 6.10 multi-site with ubuntu

ได้รับคำสั่งให้ช่วยทำ multi-site ก็เลยค้น ๆ ๆ ๆ แล้วก็ได้เวบนี้ http://drupal.org/node/53705 ใช้ในการอ้างอิง
สิ่งที่ต้องการ มีเวบ example.com อยู่แล้ว ต้องการทำ multi-site ชื่อ mul.example.com จัดการดังนี้
1. จัดการ dns ให้ใช้โดเมน mul.example.com

2. จัดการ virtual host โดยให้ DocumentRoot /var/www/drupal และ ServerName mul.example.com

3. ไปที่ /var/www/drupal/sites สร้าง ไดเรคทอรี mul.example.com

4. สร้างไดเรคทอรี files และ copy ไฟล์ settings.php จาก default

5. แก้ไข $db_url = 'mysqli://root:password@localhost/dbname'; และ $base_url = 'http://mul.example.com';


6. ติดตั้งโดย http://mul.example.com/install.php

แต่ติด error 500 Internal Server Error เข้าไปดูใน log error ของ apache พบ error ดังนี้
mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.

ตรวจสอบพบว่ามันไม่รู้จัก path install.php เลย เลยตรวจสอบ .htaccess ใน /var/www/drupal แล้วเอา comment หน้า RewriteBase / ออก จากนั้น reload apache2 ใหม่

ลองเข้าไปติดตั้งอีกครั้ง พบว่า ผ่านบริบูรณ์ แหะ ๆ นั่งงมตั้งนาน เจ้านายใจดีช่วยอีกแล้ว หุหุ ^-^

ไม่มีความคิดเห็น: