Skip to content

Instantly share code, notes, and snippets.

@basecss
Created January 4, 2015 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save basecss/b8c25d4b60ff7e94cd67 to your computer and use it in GitHub Desktop.
Save basecss/b8c25d4b60ff7e94cd67 to your computer and use it in GitHub Desktop.
Windows下配置vhost(WAMP)
  • /Apache/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "F:/xxx/xxx" <- code
    ServerName myhost.example.com
    ErrorLog "logs/myhost.example.comm-error.log"
    CustomLog "logs/myhost.example.com-access.log" common
</VirtualHost>
  • /Apache/conf/httpd.conf:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
  • Restart Server

注意

添加host映射:127.0.0.1 myhost.example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment