修改apache得documentroot

来源:互联网 发布:pyqt5 for windows 编辑:程序博客网 时间:2024/04/30 13:44





一、修改Apache  "DocumentRoot"
1.sodu vi/etc/apeche2/httpd.conf #开启virtual hosts模块
Include /private/etc/apache2/extra/httpd-vhosts.conf

2.sodu vi/etc/apache2/extra/httpd-vhosts.conf #添加虚拟服务器的root路径
<VirtualHost *:80>
    DocumentRoot "/Users/username/path/"
    ServerName www.haosheng.com
</VirtualHost>

3.sodu vi/etc/apache2/extra/httpd-userdir.conf #开启目录访问权:
<Directory "/Users/username/path>
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>




0 0
原创粉丝点击