1
ฉันจะติดตั้ง apache บน ubuntu 12.04 ของฉันได้อย่างไรที่มี virtualhost
ตามเอกสารhttps://help.ubuntu.com/10.04/serverguide/httpd.htmlฉันได้ติดตามแล้วและนี่เป็นวิธีที่ฉันทำใน Fedora ของฉันเกือบทุกครั้ง แต่ Ubuntu ดูเหมือนว่ามันจะไม่ทำงาน a) DNS เป็น IP $ echo "127.0.0.1 a" > /etc/hosts $ echo "127.0.0.1 b" > /etc/hosts b) Apache virtualhost $ ls 1 2 default default.backup default-ssl $ cat 1 <VirtualHost *:80> ServerName a ServerAlias a DocumentRoot /var/www/html/a/public <Directory /var/www/html/a/public> #AddDefaultCharset utf-8 DirectoryIndex index.php AllowOverride …