问题:使用安装lamp(lnmp)教程安装好之后,修改项目默认地址。修改了httpd.conf内的默认地址,但是刷新页面没有变化,找了好久,原来是安装完lamp之后默认开启了虚拟机配置,所以一直打到的是虚拟机上。
刚觉是个不错的idea,以免之后修改地址还要改域名解析。
1.在httpd.conf中打开虚拟机配置即可
Include conf/extra/httpd-vhosts.conf
2.修改conf/extra/httpd-vhosts.conf 根目录地址
ServerAdmin webmaster@example.com
#php_admin_value open_basedir "/home/wwwroot/default:/tmp/:/var/tmp/:/proc/"
#DocumentRoot "/home/wwwroot/default"
DocumentRoot "/home/w***o"
ServerName _
ErrorLog "/home/wwwlogs/IP-error_log"
CustomLog "/home/wwwlogs/IP-access_log" combined
#
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/hz/148118.html