ผมติดตั้งบน ubuntu และรันบน localhos ได้ครับแต่จะเปลี่ยนเป็น IP เพื่อ
ใช้บน intranet นะครับ ผมแก้ตามหัวข้อที่ 19
แต่ก็ยังรันบนเลข IP ไม่ได้ครับ
19. ถึงตอนนี้ทุกอย่างพร้อมใช้แล้ว แต่ยังใช้ได้เฉพาะ localhost
ในการใช้งานจริงที่เป็นชื่อ host หรือเลข ip
ให้ทำการแก้ไขแฟ้มข้อมูลที่เคยแก้ไขมา
จาก localhost เป็น yourhost.com แฟ้มที่ต้องแก้ไขคือ
/etc/httpd/conf/httpd.conf
/var/www/html/kv/config/mongrel_cluster.yml
ไม่ทราบว่าผมแก้ถูกไฟล์หรือเปล่า
1. ที่ไฟล์ /var/www/html/kv/config/mongrel_cluster.yml
user: www-data
cwd: /var/www/html/kv
port: "8000"
environment: production
group: www-data
address: 172.xx.xx.xxx
pid_file: log/mongrel.pid
servers: 3
2 ไฟล์ ubuntu ให้แก้ไขแฟ้ม /etc/apache2/sites-available/default
<VirtualHost *:80>
DocumentRoot /var/www/html/kv/public
<Directory "/var/www/html/kv/public">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI}
[P,QSA,L]
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
<Proxy balancer://mongrel_cluster>
BalancerMember http://localhost:8000
BalancerMember http://localhost:8001
BalancerMember http://localhost:8002
</Proxy>
</VirtualHost>
รบกวนถามครับ แก้ตรงไหนบ้างครับ
ขอบคุณมากครับ
บุญนำ
เป็นเลข ip ที่เป็นของ server นี้ืเช่น 172.x.x.x ประมาณว่า
<Proxy balancer://mongrel_cluster>
BalancerMember http://172.x.x.x:8000
BalancerMember http://172.x.x.x:8001
BalancerMember http://172.x.x.x:8002
</Proxy>
ขอให้ภาระกิจราบรื่นนะครับ
--วิภัทร
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ในไฟล์
ไม่ทราบว่าผมแก้ถูกไฟล์หรือเปล่า
/var/www/html/kv/config/mongrel_cluster.yml
user: www-data
cwd: /var/www/html/kv
port: "8000"
environment: production
group: www-data
address: 172.xx.xx.xxx
pid_file: log/mongrel.pid
servers: 3
ต้องแก้ด้วยไหมครับ
ขอบคุณครับ
บุญนำ
On 8 ก.ย., 15:39, wipa...@psu.ac.th wrote:
> ให้แก้ไขแฟ้ม /etc/apache2/sites-available/default
> เปลี่ยนข้อมูลคำว่า localhost จากเดิม
> <Proxy balancer://mongrel_cluster>
> BalancerMemberhttp://localhost:8000
> BalancerMemberhttp://localhost:8001
> BalancerMemberhttp://localhost:8002
> </Proxy>
>
> เป็นเลข ip ที่เป็นของ server นี้ืเช่น 172.x.x.x ประมาณว่า
> <Proxy balancer://mongrel_cluster>
> BalancerMemberhttp://172.x.x.x:8000
> BalancerMemberhttp://172.x.x.x:8001
> BalancerMemberhttp://172.x.x.x:8002
> > BalancerMemberhttp://localhost:8002
> > </Proxy>
> > </VirtualHost>
>
> > รบกวนถามครับ แก้ตรงไหนบ้างครับ
>
> > ขอบคุณมากครับ
> > บุญนำ
>
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
>
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.- ซ่อนข้อความที่ยกมา -
>
> - แสดงข้อความที่ยกมา -
--วิภัทร
ผมลองเปลี่ยนแล้วครับ แต่พอใช้ FireFox เปิดโดยใช้เลข IP มันขึ้นที่หน้า
page ว่า
You are being redirected.
ไม่ทราบว่าผมต้องไปแก้ไข/อัพเดทอะไรเพิ่มหรือเปล่าครับ
* หลังจากเปลี่ยนเบอร์ localhost เป็น IP แล้วจะไม่สามารถใช้ localhost
ได้ใช่ไหมครับ
ขอบคุณครับ
บุญนำ
ผมลอง ทำที่ข้อ 19 ดูแล้วก็ยังไม่ได้
ถ้าผมใช้ http://localhost --->ได้ปกติครับ
แต่ใช้ http://172.xx.xx.xxx --->มัน error ตามนั้นครับ
ผมลองใส่ http://172.xx.xx.xxx:8000 ก็ไม่ได้ครับ
ขอบคุณครับ
บุญนำ
On 10 ก.ย., 14:44, wipa...@psu.ac.th wrote:
> ลองเรียกใช้http://172.x.x.x:8000,http://172.x.x.x:8001,http://172.x.x.x:8002
> ดูว่าได้มั๊ย หากไม่ได้แสดงว่ายังไม่ได้ start mongrel ใหม่ด้วย
> ตามข้อ 19 ในเอกสารhttp://rd.cc.psu.ac.th/content/view/98/48/ครับ
--วิภัทร