How to enable mod_rewrite in Apache 2 on Debian Linux
run the command
a2enmod rewrite
Restart Apache 2 by running the command
/etc/init.d/apache2 restart
Source: How to enable mod_rewrite in Apache 2 on Debian Linux
How to enable mod_rewrite in Apache 2 on Debian Linux
run the command
a2enmod rewrite
Restart Apache 2 by running the command
/etc/init.d/apache2 restart
Source: How to enable mod_rewrite in Apache 2 on Debian Linux
ลง python ที่ server
จากนั้นแก้ไฟล์ httpd.conf
แก้ไขบรรทัดนี้
AddHandler cgi-script .cgi .pl |
โดยเติม .py เข้าไป
จากนั้น restart apache
ในส่วนของ script python ให้ใส่บรรทัด #!/PATH/TO/INTEPRETER ไว้บนสุด ขึ้นอยู่กับแต่ละเครื่องด้วยว่าติดตั้ง python ไว้ที่ไหน เช่น
#!c:/python27/python.exe |
ตัวอย่าง
#!c:/python27/python.exe print "Hello World!" |
ก็จะสามารถรันได้แล้วครับ เอาไฟล์ script python ไปใส่ที่ www แล้วลองเรียกจาก Browser ได้เลย
ในส่วนของ Status report ของ drupal ถ้าขึ้นคำเตือนแบบด้านล่างนี้นะครับ
“Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library (preferred) or to install APC.”
วิธีเปิดใช้ก็คือ
จากนั้นลองทดสอบกับตัว examples ถ้าเป็นสีเขียวก็สมบูรณ์ครับ ลองอัพโหลดไฟล์ทดสอบดู
ไฟล์แนบครับ Enabled-Upload-progress
ความรู้บางส่วนมาจาก http://drupal.org/node/259744
วิธี Monitor Apache
ไปที่ httpd.conf
1 | เปิด module mod_status |
เพิ่ม บรรทัดด้านล่างนี้ โดยที่ desktop.ip ก็แก้เป็น ip ที่อนุญาติให้สามารถเข้าดูได้ ไม่แนะนำให้ใส่ all
1 2 3 4 5 6 | <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from desktop.ip </Location> |
หาบรรทัดนี้ด้วย ถ้าไม่มีก็เพิ่มเข้าไป เป็นการเปิดความสามารถของ mod_status เพิ่มเติม
1 | ExtendedStatus On |
เสร็จแล้วก็ Restart apache
วิธีเรียกดูก็
http://server.ip/server-status?refresh=5
server.ip คือโดเมนเว็บ
refresh=5 เวลาที่จะให้รายงาน refresh เพจ
ถ้าอยากดูรายงานแบบง่าย โปรแกรมก็นี้ก็พอช่วยได้ครับ ฟรีด้วย
HSLAB HTTP Monitor Lite
เพิ่มเติมว่าหากอยากดูแบบ TCP ที่วิ่งเข้ามาก็ แนะนำโปรแกรม TCPView
ขอบคุณ @killernay สำหรับคำแนะนำครับ
ถ้าเจอข้อความ error ว่า Fatal error: Maximum execution time ตามด้วยเวลา วิธีแก้มี 3 วิธี เลือกทำวิธีใดก็ได้
วิธีแรก แก้ที่ php.ini ตรงบรรทัดที่เขียนว่า “max_execution_time” ก็เพิ่มตัวเลขเข้าไป
วิธีที่สอง เพิ่มที่ .htaccess “php_value max_execution_time 60″ เปลี่ยน 60 เป็นเวลาที่ต้องการก็ได้
วิธีที่สาม แก้ที่ script หรือถ้า wordpress แก้ที่ wp-config เพิ่มบรรทัดนี้ “set_time_limit(เวลา)” ถ้าใส่ 0 คือ ไม่มีลิมิต
ทำเสร็จแล้ว Restart Apache
ที่มา: thaiseoboard.com