# /etc/init.d/apache2 restart 重啓 /etc/apache2/conf.d 配置文件目錄 新建 httpd-vhosts.conf 內容以下 創建虛擬路徑 <Directory /home/pi/www> AllowOverride All Order allow,deny Allow from all </Directory> Alias /phpyun "/home/pi/www/phpyun/" <Directory "/home/pi/www/phpyun/"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> NameVirtualHost * <VirtualHost *> # DocumentRoot ../htdocs DocumentRoot "/home/pi/www/" ServerName default:80 #ErrorLog logs/default-error_log </VirtualHost> 修改端口: /etc/apache2/ports.conf listen:8081 天朝封了80端口