2008/Dec/08

สำหรับท่านที่ต้องการที่จะสร้างหน้า Web แต่มีชื่อเรียกเข้าไปหลายๆ ชื่อหรือที่เรียกว่า Virtual host นั้น

ใน Apache ของ ubuntu สามารถแก้ไขได้ที่

/etc/Apache2/sites-enables/000-default 

จากนั้น ก็ทำการเพิ่มข้อความเข้าไปเช่น

<VirtualHost *>

ServerAdmin xyz@crop.opp

        DocumentRoot /var/www/it 
        ServerName  it.ctext.or.th
               
                Options FollowSymLinks
                AllowOverride None
                         
            
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
                   

แล้วบันทึก จากนั้นก็ Restart อีกที

/etc/init.d/apache2 restart 

ก็เรียบร้อยครับ

ชื่อ: 
เว็บไซต์: 
คอมเมนต์:




smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry
ลองทำแล้ว ไม่ผ่านค่ะ มีขึ้นแบบนี้
Restarting web server: apache2* We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now!
kill: 235: Operation not permitted

Syntax error on line 122 of /etc/apache2/sites-enabled/000-default:
ServerName takes one argument, The hostname and port of the server
#1  by  x (125.24.164.126) At 2009-04-16 15:08, 

<< Home