环境:好的apache服务。页面可以通过浏览器访问。
1编译安装的apache安装目录//usr/local/apache
2 打开配置文件httpd.conf里面463行Include conf/extra/httpd-vhosts.conf去掉前面的注释。
然后打开配置虚拟主机的配置文件:
vi extra/httpd-vhosts.conf
<VirtualHost *:80> DocumentRoot "/kk" DirectoryIndex index.php index.html ServerName bbs.xuchunfang.tk <Directory /kk/wordpress> Options None Require all granted AllowOverride All </Directory>
3apachetl -t
重启apache服务,域名在本机hosts写下文件,打开命令行ping通域名表示本地分析正常,页面可以通过浏览器访问。