/etc/apache2/httpd.conf

去掉注释
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php5_module libexec/apache2/libphp5.so
Include /private/etc/apache2/extra/httpd-vhosts.conf
User _www 改 User liuman

/private/etc/apache2/extra/httpd-vhosts.conf文件添加多网站

Listen 8001
<VirtualHost *:8001>
    DocumentRoot "/Users/liuman/phpinfo"
	<Directory "/Users/liuman/phpinfo">
    Options FollowSymLinks Multiviews
    MultiviewsMatch Any
    AllowOverride All
    Require all granted
	</Directory>
</VirtualHost>

Listen 8002
<VirtualHost *:8002>
    DocumentRoot "/Users/liuman/jlcloud2"
	<Directory "/Users/liuman/jlcloud2">
    Options FollowSymLinks Multiviews
    MultiviewsMatch Any
    AllowOverride All
    Require all granted
	</Directory>
</VirtualHost>

Listen 8003
<VirtualHost *:8003>
    DocumentRoot "/Users/liuman/web"
	<Directory "/Users/liuman/web">
    Options FollowSymLinks Multiviews
    MultiviewsMatch Any
    AllowOverride All
    Require all granted
	</Directory>
</VirtualHost>

Listen 8004
<VirtualHost *:8004>
    DocumentRoot "/Users/liuman/backend-jquery"
	<Directory "/Users/liuman/backend-jquery">
    Options FollowSymLinks Multiviews
    MultiviewsMatch Any
    AllowOverride All
    Require all granted
	</Directory>
</VirtualHost>

Listen 8005
<VirtualHost *:8005>
    DocumentRoot "/Users/liuman/laravel5"
	<Directory "/Users/liuman/laravel5">
    Options FollowSymLinks Multiviews
    MultiviewsMatch Any
    AllowOverride All
    Require all granted
	</Directory>
</VirtualHost>
Listen 8007
<VirtualHost *:8007>
    DocumentRoot "/Users/liuman/wordpress"
 <Directory "/Users/liuman/wordpress">
    Options FollowSymLinks Multiviews
    MultiviewsMatch Any
    AllowOverride All
    Require all granted
 </Directory>
</VirtualHost>

1 对 “apache mac 配置+多站点”的想法;

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据