แสดงบทความที่มีป้ายกำกับ CentOS แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ CentOS แสดงบทความทั้งหมด

8 ก.พ. 2563

yii2 เมื่อบางโฟลเดอร์ไม่สามารถเขียนได้ และแก้ด้วย chmod แล้วยังไม่ได้

yii2 เมื่อบางโฟลเดอร์ไม่สามารถเขียนได้ และแก้ด้วย chmod แล้วยังไม่ได้

chcon -R -t httpd_sys_content_rw_t 'YOUR_PATH_HERE'

23 ม.ค. 2563

Config phpMyAdmin in CentOS7

 /usr/share/phpMyAdmin/>
   AddDefaultCharset UTF-8

    mod_authz_core.c>
     # Apache 2.4
     
       Require ip 127.0.0.1
       Require ip ::1
       Require ip 192.168.1.11
     
!mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1

CentOS ติดตั้ง iptables แทน firewall เดิม

ทำการปิด และหยุดการทำงาน ของ Default Firewall ของ centos 

systemctl disable firewalld
systemctl stop firewalld
ปิดการทำงานโดยอัตโนมัติเมือทำการ boot os ใหม่
systemctl mask firewalld

วิธีทำการติดตั้ง iptables service และเปิดการใช้งาน iptables

yum install iptables-services -y
systemctl status iptables
systemctl enable iptables
systemctl start iptables
 
วิธีตรวจสอบ config ของ iptables
  •  rpm -qc iptables-services

14 ก.ย. 2562

CentOS web user error forbidden 403

เมื่อสร้าง user และต้องการให้ user มีเว็บไซต์ส่วนตัว
1. สร้าง user ผ่าน webmin
2. แก้ไข comment ใน httpd.conf เอา remark ออกจาก   UserDir public_html
3. แก้ช่วง user directory



#    AllowOverride FileInfo AuthConfig Limit
#   Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
   
        Order allow,deny
        Allow from all
   
   
        Order deny,allow
        Deny from all
   



4. ใช้คำสั่ง getenforce
5. ใช้คำสั่ง  setenforce 0


เท่านี้ user ก็จะมี website ของตัวเอง

30 มิ.ย. 2557

การติดตั้ง webamin สำหรับ centOs

การติดตั้ง webamin สำหรับ centOs

 วิธีการติดตั้ง Webmin บน CentOS



 1. ดาวน์โหลดไฟล์ติดตั้งด้วยคำสั่ง wget

wget http://prdownloads.sourceforge.net/webadmin/webmin-1.650-1.noarch.rpm

28 มิ.ย. 2557

Apacher Error : could not reliably determine


httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName


host ตัวอย่าง  data.udonpit.ac.th

แก้ไขไฟล์  /etc/hosts

Open mod_rewrite บน CentOS

mod_rewrite

mod_rewrite is an Apache module used to manipulate URL's and is compiled into the base Apache HTTP Server in CentOS. See the mod_rewrite documenation for more information.