树莓派下的apache

 # /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端口

你可能感兴趣的:(树莓派下的apache)