我爱编程PHP经验分享工具癖

Configure Apache Virtual Hosts o

2016-09-01  本文已影响0人  NicolasWan
sudo su
vi /etc/apache2/httpd.conf
#Include /private/etc/apache2/extra/httpd-vhosts.conf
Include /private/etc/apache2/extra/httpd-vhosts.conf
User _www
Group _www
User $(whoami)
Group wheel
<Directory />
    AllowOverride none
    Require all denied
</Directory>
<Directory />
    AllowOverride all
    Require all granted
</Directory>
vi /etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
    DocumentRoot "/Users/$(whoami)/Documents/WorkSpace"
    ServerName mysite
    ErrorLog "/private/var/log/apache2/mysites-error_log"
    CustomLog "/private/var/log/apache2/mysites-access_log" common
    <Directory "/Users/$(whoami)/Documents/WorkSpace">
        Options FollowSymLinks Multiviews Indexes 
        MultiviewsMatch Any
        AllowOverride None
        Require all granted
    </Directory>
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPass /web $(your server url)/web
    ProxyPassReverse /web $(your server url)/web
</VirtualHost>
vi /etc/hosts
127.0.0.1 mysite
上一篇 下一篇

猜你喜欢

热点阅读