linux下配置虚拟域名
2024-08-31 07:49:51
linux下配置虚拟域名
1.hosts文件位置!
/etc/hosts
2.增加一行
127.0.0.1 xxxxx
3.修改apache中的vhosts
vi /etc/httpd/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin 192.168.1.66/admin
DocumentRoot "/usr/local/apache2/htdocs/tp5admin"
ServerName 192.168.1.66
</VirtualHost>
4.开启vhosts
Include conf/extra/httpd-vhosts.conf
5.重启apache
service httpd restart
解决The requested URL /login was not found on this server
<Directory />
AllowOverride All
Order allow,deny
Allow from all
</Directory>
DocumentRoot "/usr/local/apache2/htdocs"
<Directory "/usr/local/apache2/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
开启重写模块
LoadModule rewrite_module modules/mod_rewrite.so
最新文章
- 被忽略的js细节
- 大一上学期的一点小疑惑,代码验证ok
- 安卓开发_浅谈ContextMenu(上下文菜单)
- [Js]基础知识
- 洗清UI自动化鸡肋说的不白之冤
- ThinkPHP整合百度Ueditor图文教程
- oc拨打电话
- StarUML---推荐一款UML工具(很好很强大)
- Java Socket通信以及可能出现的问题解决
- Qt之QDomDocument操作xml文件-模拟ini文件存储
- pydoc用法
- Pycharm下面出现No R interpreter defined
- Unity shader学习之高光反射光照模型
- 【2017-04-20】Sql字符串注入式攻击与防御,实体类,数据访问类
- springmvc相关
- 混乱之子第七季/全集Sons of Anarchy迅雷下载
- [转载]eclipse自动同步插件filesync的使用
- Web应用三种部署方式的优缺点
- 安装部署VMware vSphere 5.5文档 (6-3) 安装配置AD域控制器
- ubuntu zip解压
热门文章
- Service不完全解析
- jsp指令介绍
- javascript中对象两种创建方式
- RabbitMQ学习之ConntectionFactory与Conntection的认知
- Robot Framework(二)测试数据语法
- 面试题-mysql
- 获取Centos7安装Docker各种姿势(指定版本)(转载)
- BZOJ 1691 [Usaco2007 Dec]挑剔的美食家 multiset_排序_贪心
- js脚本捕获页面 GET 方式请求的参数?其实直接使用 window.location.search 获得
- elasticsearch的mapping